Hello, I have a very simple setup. I am using ActiveMQ 5.11.1 and have a simple persistent Queue where I publish messages. I am running a utility to update headers on these messages.
I simply make my connection, then I start it, get the session, create the Queue and then create the consumer using a simple JMSMessageID selector. connectionFactory = new ActiveMQConnectionFactory(username, password, url); connection = connectionFactory.createConnection(); connection.start(); session = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE); destination = session.createQueue(queue); String messageFilter = JMSMessageID + " = '" + messageId + "'"; MessageConsumer consumer = session.createConsumer(destination, messageFilter); TextMessage message = (TextMessage)consumer.receive(200); The problem is once I reach a certain number of pendingMessages on the Queue, my consumer.receive does not return my message, even though it is shown on the management console. I have been breaking my head and playing with different configs and still no luck. Note: I do not have any consumers attached to the Queue when I run my utility. More over, its only the latest messages that I cannot find so it feels likce receive is looking only at the first n number of messages and if JMSMessageID is no there then it returns null. Can someone please help me. -- View this message in context: http://activemq.2283324.n4.nabble.com/Issue-with-MessageConsumer-and-MessageSelector-tp4704870.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.