activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ipolevoy <i...@expresspigeon.com>
Subject Re: ActiveMQ does not send some messages
Date Sat, 30 Jan 2016 05:58:48 GMT
Hi, Justin. 

We are getting this condition every day.  Here is some more information. 
When largemessages directory has some files that do not get processed, we
can still get the count
of messages in queues like this:


ObjectName queueName =
ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queueName);
        JMSQueueControl queueControl =
MBeanServerInvocationHandler.newProxyInstance(ManagementFactory.getPlatformMBeanServer(),
                                                                queueName,
JMSQueueControl.class, false);
        
        int count = queueControl.countMessages(null);

The number returned by this code corresponds to number of files in the
directory. 
When a broker is in this state, we are trying to peek inside the queue with
this code: 

session = consumerConnection.createSession();
Enumeration messages = session.createBrowser(queue).getEnumeration();
            for (int i = 0; i < messageCount && messages.hasMoreElements();
i++) {
                TextMessage msg = (TextMessage) messages.nextElement();
                ///... 
            }


However, no messages are returned by this code. 
So, the message count in queue is not 0, but cannot browse messages with
QueueBrowser. 
As before, restarting the broker makes problems go away and all messages
somehow get recognized and delivered.


Another new condition now: there is one file in largemessages directory, but
its size is 0 bytes, and its name is 3255027.msg


Is this information helpful in any way? 

tx



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-does-not-send-some-messages-tp4706550p4706672.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message