activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vavricka <>
Subject JMSMessageID filtering
Date Mon, 23 May 2016 13:46:23 GMT

  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

  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:

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)? 


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

View raw message