activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sreekar <trinadhnal...@gmail.com>
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 - END:

                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 (
                                               amqMessageToSend.getMessage()
);

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

  CONSUMER - END:
          
                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 ?

http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/selector/SelectorTest.java?view=markup

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,
Sreekar

--
View this message in context: http://activemq.2283324.n4.nabble.com/How-does-the-Active-MQ-perform-search-in-the-messages-for-the-given-MESSAGE-SELECTOR-tp4545137p4578210.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message