spring boot – Can we use RabbitMQ for Distributed Transaction in microservice and how we can identify response for perticuler request

Used Technologies: SpringBOOT,RabbitMQ

Let say we have two microservices service1s and service2,and both inter commiunicate asynchronous way using choreography pattern(SAGA).

request —-> service1(publisher) —->RabbitMQ(Message Broker)—->service2(consumer)

Once service2 do the process and again response push in RabbitMQ as follows

service2(publisher)—>RabbitMQ—–>Service1(consumer)

So my question is how we attached to request to response (coming from service2). how we can identify one single transaction or transactionId.Is that possible or if not what is the solution for this ,some one help me on this.

Read more here: Source link