Re: Clarification of JMS MessageConsumer.receive(timeout)

2024-09-24 Thread Justin Bertram
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

RE: Clarification of JMS MessageConsumer.receive(timeout)

2024-09-21 Thread John Lilley
That code formatting didn't work. Should have looked like: Destination destination = session.createQueue(queueName); String selector = propertyName + "='" + propertyValue + "'"; var consumer = session.createConsumer(destination, selector); Message message = null; while ((message = consumer.receive