qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: C++ API - Check whether queue exists
Date Wed, 13 Jan 2016 18:09:22 GMT
On 01/13/2016 04:07 PM, RatTac@web.de wrote:
> Hi,
> I am using the C++ messaging API for QPID to realize an
> remote-procedure-call (RPC) via a request-reply pattern (see
> https://qpid.apache.org/releases/qpid-0.24/programming/book/ch02s12.html)
>
> The client pushes to a service-queue and generates an reply-queue.
> The server reads from the service-queue and pushes to the reply-queue.
>
> The reply-queues are automatically deleted if the client disconnects. It may
> thus happen, that the reply-to flag of a message (received by the server)
> contains a queue which does not exist anymore.
>
> The code
> const Address& address = request.getReplyTo();
> Sender sender = session.createSender(address);
> will in this case create an exception and invalidates the current session.
>
> I would like to check in advance, whether a queue exists before creating the
> sender. Is this anyhow possible with the C++ messaging API?

Could you use AMQP 1.0 rather than 0-10? If so then the failure to 
create a sender should not affect the session.

Another option if you are stuck on 0-10, is to use a reply address based 
on an exchange (e.g. my-exchange/<uuid>). That way you can also just use 
a single sender to send all responses.




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


Mime
View raw message