Browsing JMS messages using selector
Requirement
I want to browse for messages, using a selector.
SENDER
I'm sending messages in my Queue, with a property PARAMETER_ID set in it as.
message.setStringProperty("PARAMETER_ID",param_id);
Assume there are 4 messages sent in my Queue.
1. Text=Message1,PARAMETER_ID=1233
2. Text=Message2,PARAMETER_ID=4566
3. Text=Message3,PARAMETER_ID=1233
4. Text=Message4,PARAMETER_ID=4566
RECEIVER
--
I want to browse messages that have a certain PARAMETER_ID property set in it.
So here's what I'll do.
String myselector = "PARAMETER_ID=1233";
QueueBrowser qb=session.createBrowser(queue,myselector );
The QueueBrowser instance returned, should have 2 messages in it, that can be browsed.
But I dont get any results and there's no exception.
What am I doing wrong?
btw - If I set the myselector to "", it returns me all 4 messages to browse.
I'm using JBOSS with JMS 1.1
Thanks

