title: how to send response from consumer to producer to the particular request using Spring AMQP?
body: <p>we have one problem statement in our application where we are getting null response at the producer end.</p>
  
  <p>1> Producer will produce message (REQUEST_QUEUE) and it will wait for the response.</p>
  
  <pre><code>Object receivedData = amqpTemplate.convertSendAndReceive("IKEY123456");
  System.out.println("RESPONSE DATA: " + receivedData);
  </code></pre>
  
  <p>2> At consumer end it will consume message and </p>
  
  <pre><code>Class TestConsumer {
      AmqpTemplate amqpTemplate;
  
      public void methodA(){
          String msg = (String)amqpTemplate.receiveAndConvert()
          process(msg);
      }
  
      public void process(String msg){
          // ... process something on that message
          Object resData = service.makeChanges(msg);
  
          // I want to send 'resData" object back to the producer
          amqpTemplate.convertAndSend(resData);
      }
  }
  </code></pre>
  
  <p>Response at producer end is null. "RESPONSE DATA: null"</p>
  
  <p>Can anyone tell me how to send response back to producer and how to achieve correct response received to the request which we send.</p>