On Mon, May 9, 2011 at 6:36 AM, Gordon Sim <[email protected]> wrote:
> On 05/09/2011 08:51 AM, Heinrich Muralt wrote:
>>
>> Hi,
>>
>> I’m a newbie in Apache Qpid and read “Programming in Apache Qpid“. I’ve
>> got
>> a question concerning the Request/Response Pattern shown here:
>>
>> http://qpid.apache.org/books/trunk/Programming-In-Apache-Qpid/html/ch02s12.html
>>
>> http://qpid.apache.org/books/trunk/Programming-In-Apache-Qpid/html/ch02s12.html
>>
>> The concept is to create a response queue for each request, right?
>
> Generally you would reuse the same response queue for multiple consecutive
> requests (if you were making more than one that is).

Just to add to Gordon's comment. Multiple responses sent to the same
response queue can be correlated using a correlation id.
That is when a request  message is sent, you add a correlation id in
the message properties.
The entity that is responsible for processing the request (and sending
the response) will insert that correlation id into the response
message.

That way a user can correlate each response to a particular request.

>> I was
>> wondering how this should work when several clients send requests to the
>> request queue (on the same broker) simultaneously. Does each client create
>> and use its own response queue? Or do all clients use a common response
>> queue since they all define the same name for the response queue
>> (#response-queue)?
>
> No, each client will get its own queue, uniquely named. "if the address
> starts with the character #, it is given a unique name" - the '#' is
> replaced with a uuid.
>
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:[email protected]
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to