<div dir="ltr"><a href="http://docs.spring.io/spring-amqp/reference/html/amqp.html#request-reply">http://docs.spring.io/spring-amqp/reference/html/amqp.html#request-reply</a><br><div><br></div><div>The simplest is to configure the RabbitTemplate to use a fixed reply queue, with a reply listener, and use one of it&#39;s convertSendAndReceive(...) (or sendAndReceive) methods; the template will take care of the correlation.</div>
<div><br></div><div>If you want to do it asynchronously and do your own correlation (get the reply asynchronously on another thread) just use one of the send() methods and wire up a listener container to get the results.<br>
</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Nov 8, 2013 at 12:36 AM, Rajasekhar P <span dir="ltr">&lt;<a href="mailto:sekhar434145@gmail.com" target="_blank">sekhar434145@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Team,<div><br></div><div>We are trying to make asynchronous call in RabbitMQ using Spring AMQP, could any one please tell me how to configure <b>replyqueue, correlationId, (properties) </b>using spring amqp?</div>

<div><pre style="background-color:rgb(238,238,238);padding:5px 15px;border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;color:rgb(85,85,85);font-size:13px;line-height:18px">
 <span style="color:rgb(0,128,128)">String</span> <span style="color:rgb(0,128,128)">corrId</span> <span style="font-weight:bold">=</span> <span style="color:rgb(0,128,128)">java</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">util</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">UUID</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">randomUUID</span><span style="font-weight:bold">().</span><span style="color:rgb(0,128,128)">toString</span><span style="font-weight:bold">();</span>

<span style="color:rgb(0,128,128)"> BasicProperties</span> <span style="color:rgb(0,128,128)">props</span> <span style="font-weight:bold">=</span> <span style="font-weight:bold">new</span> <span style="color:rgb(0,128,128)">BasicProperties</span>
                                <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">Builder</span><span style="font-weight:bold">()</span>
                                <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">correlationId</span><span style="font-weight:bold">(</span><span style="color:rgb(0,128,128)">corrId</span><span style="font-weight:bold">)</span>
                                <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">replyTo</span><span style="font-weight:bold">(</span><span style="color:rgb(0,128,128)">replyQueueName</span><span style="font-weight:bold">)</span>
                                <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">build</span><span style="font-weight:bold">();</span>

 <span style="color:rgb(0,128,128)">channel</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">basicPublish</span><span style="font-weight:bold">(</span><span style="color:rgb(221,17,68)">&quot;&quot;</span><span style="font-weight:bold">,</span> <span style="color:rgb(0,128,128)">requestQueueName</span><span style="font-weight:bold">,</span> <span style="color:rgb(0,128,128)">props</span><span style="font-weight:bold">,</span> <span style="color:rgb(0,128,128)">message</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">getBytes</span><span style="font-weight:bold">());</span>
</pre></div><div><span style="font-weight:bold"><br></span></div><div><span>Thanks in advance.</span></div></div>
<br>_______________________________________________<br>
rabbitmq-discuss mailing list<br>
<a href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a><br>
<a href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss" target="_blank">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a><br>
<br></blockquote></div><br></div>