I have an application(APP), and now i need to integrate with some service(SERVICE-1) which supports communication through rabbitmq(sending request to one queue and listen for response in another one), i decided to move all the rabbitmq part to separate service(SERVICE-2) and communicate with it through REST api calls.
The problem is - in APP i need a synchronous response to my call, so SERVICE-2 need somehow to synchronize those request: like it needs to get a HTTP request -> send request to rabbitmq -> wait for response from rabbitmq -> give HTTP response back in a single HTTP session.
But responses in rabbitmq may be in other order, for example i send requests with id 1,2,3 and receive back them in order 3,1,2