qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Moravec <pmora...@redhat.com>
Subject Re: Creation of Request and Response quese
Date Thu, 19 Apr 2012 06:50:21 GMT
Hi Sumi,
it is enough to set reply-to in the message request and have a subscriber of that response
queue. See attached C++ example program (its purpose is to send a QMF query to get some queue
details and requesting to get the response to the given queue).

So the key commands are:

//create a receiver of the response queue; I recommend having there "{create:always, delete:always}"
part to automatically create it now and delete it once the receiver is closed
Receiver r = session.createReceiver(<response-queue>);

//in the request message m, set reply-to

(sending the request message)

//fetch / receive the response, wait for it at most 3 seconds
m = r.fetch(3 * Duration::SECOND);

To ensure unique and exclusive access to the response queue, it makes sense to have the queue
named with some uuid (i.e. use uuid_generate method in C++) and to use exclusive queue (to
grant the only access to the queue only for this subscriber).

Kind regards,

----- Original Message -----
> From: "Sumi" <subha.manjunath@newedge.com>
> To: users@qpid.apache.org
> Sent: Thursday, April 19, 2012 7:32:14 AM
> Subject: Creation of Request and Response quese
> Hi,
> I am very new to Qpid , How do i create Request and response queues
> For ex:request queue , durable , direct exchange
> "response queue" : is an temporary queue and what should be my reply
> to
> property and how to bind these two queues so that when my producer
>  send
> message to request queue , the consumer should be able to recieve
> from the
> response queue ? Please help this might be basic question  but i am
> very new
> to qpid and have been asked to create req , response queues?
> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/Creation-of-Request-and-Response-quese-tp7479418p7479418.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org

View raw message