title: In Springboot microservices api, how to call a another server using AMQP queue, get response from the another service queue, send the response
body: <p>We are writing the micro-services platform. We have a server A written in spring boot which is exposing API to the outside world.</p>
  
  <p>We have another spring-boot microservice B which needs to be called from A.</p>
  
  <p><strong>Example:</strong></p>
  
  <p>We are having an endpoint /createOrder in service A.</p>
  
  <p>When we call this, A's controller gets called, need to send a message to server B using AMQP JMS integration, B receives the queue process the controller, send the message back to Server A so that response can be sent to the API request of /create order.</p>
  
  <p>---->/createorder-->A Server --->A sends a message queue to B's server ---> B server process it ---> Sends a message to A --->A responds to the request.</p>
  
  <p>In this process how to hold the request in <strong>Server A</strong> and wait for a response from <strong>Server B</strong>.</p>