On 05/23/2016 09:46 AM, Vavricka wrote:
Hi,

   I am using JMS 1.0 client version 0.9.0 and Artemis server version 1.3.0.

   I am trying to filter incoming messages by creating selector when creating
Consumer.

   Message is created by:

Message msg = session.createMessage();

   MessageID is get by:

String messageID = msg.getJMSMessageID();
String JMSMessageID = messageID.substring(4, messageID.length() - 8);

ex: messageID = ID::4a31cd43-d16a-4f5a-9e44-8b39b9e6ae26:1:1:1-1
      JMSMessageID = 4a31cd43-d16a-4f5a-9e44-8b39b9e6ae26

   Message is successfully sent, then I create consumer by:

MessageConsumer receiver = session.createConsumer("test.queue",
"JMSMessageID = '" + JMSMessageID + "'");

   When selector is defined in createConsumer, message is not received. When
I remove selector, message is successfully received with id:
ID::4a31cd43-d16a-4f5a-9e44-8b39b9e6ae26:1:1:1-1

I tried many messageID formats - with/without 'ID::' prefix, with/without
':1:1:1-1' suffix, etc.

Is this correct way how to filter MessageID ?

I suppose AMQP filtering is not supported (for example: amqp.message_id)?

Regards,
Vavricka




--
View this message in context: 
http://activemq.2283324.n4.nabble.com/JMSMessageID-filtering-tp4712257.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

The broker won't be able to select on the MessageID as the AMQP message ID is foreign to the broker and it must create its own internal instance in order to properly function so the ID the client assigns wouldn't match what the real broker side message has as its ID.

--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/

Reply via email to