activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sreekar <>
Subject Re: How does the Active MQ perform search in the messages for the given MESSAGE_SELECTOR?
Date Sun, 22 Apr 2012 13:55:19 GMT
Hi Team,

I have tried to use the message_selector using the C++ client.
But am unable to filter the messages.

Without selector, i am able to recieve all the messages.
(It can be assured that connection, session, destination, consumer, producer
are created correctly)

Things which i tried:

                producer = session->createProducer (MY_QUEUE);
       // In actual case i am doing the following thing in a loop,
       // correlationID is set using a counter variable.
                TextMessage* textMessage = session->createTextMessage (

                // set the unique-identifiers for the message
                textMessage->setCMSCorrelationID ( "23781729" );
                producer->send ( textMessage, PERSISTENT);

                std::string filter = "JMSCorrelationID = '23781729'";
                session->createConsumer (MY_QUEUE, filter);

I am sending around 5000 messages from PRODUCER-END and am recieving them
successfully at CONSUMER-END when i created consumer without any selector
("JMSCorrelationID = '23781729'");

I tried with  "JMSCorrelationID = '23781729'" and "CMSCorrelationID =
'23781729'", but i could not recieve any messages from CONSUMER-END.

Is there anything wrong with the syntax ?

The syntax mentioned above (for message-id) is like :
"JMSMessageID = 'id:test:1:1:1:1'"

In similar lines, i tried to filter with correlation-ID (which is also a JMS
property that can be set by user).

Any suggestions would be appreciable.

Thanks & Regards,

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message