You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by "Wisler, Trina" <Tr...@hp.com> on 2011/09/08 22:03:25 UTC

associating an incoming message with a queue

Hi,

We have a Listener class that is inherited from client::MessageListener.   This class/object will have many queues associated with it.  There will be cases where the same subscription key is associated with several queues. We need a way to determine which queue a given message was received on (without having to have separate Listener classes for each queue).   Does anyone know if there is an API available or how we determine in our received method which queue a message came in on?

We are currently using qpid 0.6 and are about to upgrade to qpid .10.

Thanks,
Trina Wisler

Re: associating an incoming message with a queue

Posted by Gordon Sim <gs...@redhat.com>.
On 09/08/2011 09:03 PM, Wisler, Trina wrote:
> Hi,
>
> We have a Listener class that is inherited from
> client::MessageListener.   This class/object will have many queues
> associated with it.  There will be cases where the same subscription
> key is associated with several queues. We need a way to determine
> which queue a given message was received on (without having to have
> separate Listener classes for each queue).   Does anyone know if
> there is an API available or how we determine in our received method
> which queue a message came in on?

qpid::client::Message::getDestination() will return the 'tag' used for 
the subscription for which a message has been received. That lets you 
match them up to the queue it came from (indeed by default the 
subscription manager will use the queue name for the tag)

> We are currently using qpid 0.6 and are about to upgrade to qpid
> .10.
>
> Thanks, Trina Wisler
>


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org