Skip to content

Tag: microservices

Can I use Azure Event Grid topics to communicate domain events in a microservice architecture?

I am confused. When comparing the messages services offered by Microsoft Azure, we can choose between: Event Grid Event Hubs Service Bus (Azure Cache for Redis) This link gives the following comparison: Now I’d like to write a microservice application consisting of several components. Each component should communicate local domain events to a topic (pub/sub). This could be achieved by

How to avoid duplicate code in Java when you require the same class in two separated applications?

For the sake of simplicity, let’s say that I have a class named “Dog”. Then I have two separated applications containing implementations of that class. Application “A” does something with the Dog class. Application “B” does another something with the Dog class. Both applications require the Dog class, hence it would be duplicated. Now let’s say for a moment that:

Microservices communication with optional parameters requests

I have a room service which returns detail for rooms when requesting http://localhost:8082/room/search/byRoomChar Now I want to request this @GetMapping from the booking service since this is the application gateway that users are going to interact with using the http://localhost:8081/booking/search/byRoomChar. Room entity code: Room repository code: However, this does not work because when omitting parameters when calling the getmapping from

Spring POST Method Microservice 500 exception

So, im trying to write a microservice with basic GET POST PUT DELETE commands. Its a Spring Maven Java programm with a mysql server When I try to post something it works, however if I dont include the Id it returns an exception: This is weird, because in the mysql console I can Insert a customer without the id, it

Multiple RestTemplate calls for each Id in a List

I need to make multiple RestTemplate calls for each of the Id in a List<Ids>. What is the best way to perform this? I have used parallelStream(). Below code snippet is a similar scenario. employeeService.fetchEmployeedetails is a kind of restCall which will fetch all the employeeDetails. Is there any other way to tune the performance? Answer .parallelStream() does not guarantee

Uni.combine().all().unis() v.s. Multi..onItem().transformToMultiAndConcatenate().collect()

In my Quarkus service, I need to fetch a list of results from external service, and I figured out there are two methods to achieve the same goal: 1st approach based on Uni.combine().all(): 2nd approach based on Multi..onItem().transformToMultiAndConcatenate().collect() In the beginning I don’t think there exists any true difference between the two approaches, as Uni are evaluated lazily and either