[rabbitmq-discuss] How to configure reply queue?

Gary Russell grussell at gopivotal.com
Fri Nov 8 13:50:44 GMT 2013


http://docs.spring.io/spring-amqp/reference/html/amqp.html#request-reply

The simplest is to configure the RabbitTemplate to use a fixed reply queue,
with a reply listener, and use one of it's convertSendAndReceive(...) (or
sendAndReceive) methods; the template will take care of the correlation.

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.



On Fri, Nov 8, 2013 at 12:36 AM, Rajasekhar P <sekhar434145 at gmail.com>wrote:

> Hi Team,
>
> We are trying to make asynchronous call in RabbitMQ using Spring AMQP,
> could any one please tell me how to configure *replyqueue, correlationId,
> (properties) *using spring amqp?
>
>  String corrId = java.util.UUID.randomUUID().toString();
>  BasicProperties props = new BasicProperties
>                                 .Builder()
>                                 .correlationId(corrId)
>                                 .replyTo(replyQueueName)
>                                 .build();
>
>  channel.basicPublish("", requestQueueName, props, message.getBytes());
>
>
> Thanks in advance.
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131108/cd4b42fc/attachment.htm>


More information about the rabbitmq-discuss mailing list