qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Flores, Paul A." <PAUL.A.FLO...@SAIC.COM>
Subject RE: Help!: Generation of a unique queue name... weird results..OR
Date Mon, 04 Apr 2016 15:43:19 GMT
Thanks Robbie.  Helped to clarify what is going on!

Which spurs question about temporary queues and when queues are deleted.  That will be another
question for the discussion board!

________________________________________
From: Robbie Gemmell [robbie.gemmell@gmail.com]
Sent: Monday, April 04, 2016 9:37 AM
To: users@qpid.apache.org
Subject: Re: Help!: Generation of a unique queue name... weird results..OR

The general process is typically to establish somewhere for responses
to go and start listening for them, send messages requiring response,
process responses as they arrive. Not unlike a traditional message in
an envelope. You can of course play with that order if for example you
were using either pre-existing queues or deterministically-named
auto-created queues.

As shown in the client example Gordon pointed to, creating a receiver
using "#" also creates a temporary queue with unique name on the
broker. Once that completes you can then ask for the address of the
temporary queue, which is where that receiver is now consuming from
and thus where replies to it should be sent. You then set that address
as the reply-to value on any outgoing messages where you want
recipients to send replies back to that queue/receiver. Folks
receiving such messages then retrieve the reply-to address from the
message and send their reponse to it.

Robbie

On 4 April 2016 at 14:47, Flores, Paul A. <PAUL.A.FLORES@saic.com> wrote:
> Gordon,
>
> So am I right in understanding that after I generate a "reply to" address I should create
a receiver so as to instantiate that queue before I send the message populated with the "reply
to" address? So the order in which a "reply to" address is utilized 'matters'?  A unique "reply
to' queue must be created by a receiver before a sender attempts to utilize that queue?
>
> Paul
>
> ________________________________________
> From: Gordon Sim [gsim@redhat.com]
> Sent: Sunday, April 03, 2016 12:06 PM
> To: users@qpid.apache.org
> Subject: Re: Help!: Generation of a unique queue name... weird results..OR
>
> On 01/04/16 21:00, Flores, Paul A. wrote:
>> So here is the situation.
>>
>>
>>
>> I have a requester that is doing the following:
>>
>>          const char* response_queue="#response_queue; {create: always}";
>>          message.setReplyTo(Address(response_queue));
>>
>>
>>
>> The responder that receives the message but when it tries
>>
>>     Address reply_to_address=request_message.getReplyTo();
>>
>>     Sender reply_sender = session.createSender(reply_to_address);
>>
>>
>>
>> I am seeing:
>>
>> 2016-04-01 13:41:16 [Client] warning Exception received from broker: not-found: Queue
not found: eb67d5b2-8c95-4338-9a01-f8017bbae223#response_queue (/home/pflores/shop/qpid-cpp-0.34/src/qpid/broker/QueueRegistry.cpp:127)
[caused by 9 \x08:\x01]
>> Queue eb67d5b2-8c95-4338-9a01-f8017bbae223#response_queue does not exist
>>
>>
>>
>> Any insights /help/comments/suggestions?
>
> Have a look at client.cpp in examples/messaging. You can use
> receiver.getAddress() to get the actual address you are using for the
> receiver on which you are waiting for replies. The queue is only created
> when there is a receiver.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
> ________________________________
>
> This communication (including any attachments) may contain information that is proprietary,
confidential or exempt from disclosure. If you are not the intended recipient, please note
that further dissemination, distribution, use or copying of this communication is strictly
prohibited. Anyone who received this message in error should notify the sender immediately
by telephone or by return email and delete it from his or her computer.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org

________________________________

This communication (including any attachments) may contain information that is proprietary,
confidential or exempt from disclosure. If you are not the intended recipient, please note
that further dissemination, distribution, use or copying of this communication is strictly
prohibited. Anyone who received this message in error should notify the sender immediately
by telephone or by return email and delete it from his or her computer.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message