You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rajesh Khan <ra...@gmail.com> on 2013/01/09 22:53:30 UTC
Retrieving specific messages from Last Value Queue
Hi I have a receiver in C# that is suppose to retrieve messages from a LV
Queue.
Currently I traverse through all the messages in that queue. AS follows
while (receiver.Fetch(ref msg, timeout))
{
* prop = msg.Properties;*
}
I wanted to know if there is a way to retrieve a message that has a
specific value.
For instance The sender sends the following value
msga.SetProperty("stock-symbol", "ORCL");
sender.Send(msga);
Is there any way that I could retrieve the ORCL message without iterating
through other messages?
Re: Retrieving specific messages from Last Value Queue
Posted by Pavel Moravec <pm...@redhat.com>.
Hi Rajesh,
you are in fact asking for message selectors that work well in Java client but dont exist in C++ client or in broker (https://issues.apache.org/jira/browse/QPID-530). I *think* only Java / JMS client currently supports so.
The only way to workaround is to have separate queues for each stock symbol (or at least separate queue for each symbol you wish to _select_) and subscribe consumers to all such queues (plus optionally consume from the designated queue for e.g. ORCL quote).
Kind regards,
Pavel
----- Original Message -----
> From: "Rajesh Khan" <ra...@gmail.com>
> To: users@qpid.apache.org
> Sent: Wednesday, January 9, 2013 10:53:30 PM
> Subject: Retrieving specific messages from Last Value Queue
>
> Hi I have a receiver in C# that is suppose to retrieve messages from
> a LV
> Queue.
> Currently I traverse through all the messages in that queue. AS
> follows
> while (receiver.Fetch(ref msg, timeout))
> {
> * prop = msg.Properties;*
> }
> I wanted to know if there is a way to retrieve a message that has a
> specific value.
> For instance The sender sends the following value
>
> msga.SetProperty("stock-symbol", "ORCL");
> sender.Send(msga);
>
> Is there any way that I could retrieve the ORCL message without
> iterating
> through other messages?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org