activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jecsiac <jecs...@163.com>
Subject Problem with Selector
Date Tue, 26 Aug 2008 07:38:17 GMT

Hi, I have a problem when using selector in ActiveMQ 5.1.0. 

I set a property named 'SomeId' on every Message sent to the queue, and
every Message has a different value of that property (the value is just the
order of the message sent to the queue, for example, for the first message
sent to the queue, it's SomeId is 1, and for the second, is 2, and so on.
And here, I use this mechanism is just for describing the problem easily.
It's not the thing that I want to realize). When I use selector to receive
message from the queue, I get a strange result: I send 2000 messages to the
queue, and when I write:

QueueReceiver receiver = session.createReceiver(queue, 'SomeId = 5');
receiver.receiveNoWait();

I can get the message. But when I write:

QueueReceiver receiver = session.createReceiver(queue, 'SomeId = 200');
receiver.receiveNoWait();

I just get null. What's the problem? I do the just same thing on JBossMQ,
everything is right, no problem. So I just do not known what's going wrong.

Thanks
Best regards
-- 
View this message in context: http://www.nabble.com/Problem-with-Selector-tp19157015p19157015.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message