Reputation: 239
How can I filter the messages from IBM MQ queue in IIB ACE and pick only those messages which are there for more than 5 minutes filtering on the basis on put time?
Upvotes: 0
Views: 46
Reputation: 4737
JMS Messages have a JMSTimestamp
field, which holds the time the message was sent.
You could create a selector based on
String messageSelector = "JMSTimestamp <= " + System.currentTimeMillis() - (1000 * 60 * 5);
...
receiver = (MessageConsumer) session.createConsumer(replyQueue, messageSelector);
Upvotes: 0