If you only care about messages that are already in the queue then I
recommend using receiveNoWait() [1].
Justin
[1]
https://docs.oracle.com/javaee/7/api/javax/jms/MessageConsumer.html#receiveNoWait--
On Sat, Sep 21, 2024 at 2:03 PM John Lilley
wrote:
> I am trying to build a utility for purg
lil...@redpointglobal.com<mailto:john.lil...@redpointglobal.com>
-Original Message-
From: John Lilley
mailto:john.lil...@redpointglobal.com.INVALID>>
Sent: Saturday, September 21, 2024 1:03 PM
To: users@activemq.apache.org<mailto:users@activemq.apache.org>
Subject: Clarification
I am trying to build a utility for purging a queue of all messages matching a
filter. The purpose is to remove “job start” messages that have been aborted
before they were consumed and started.
To this end I have code like:
Destination destination = session.createQueue(queueName);
String selec