9

I recently upgraded a server from ActiveMQ from 5.8 to the latest (5.11.1). Since then, I've noticed somewhat sporadically that messages will build up on a particular queue and not be taken off.

Our architecture has one producer, one consumer. I can see that the consumer is still connected but messages are piling up from the producer. My solution has been to delete the queue via the web console. After which, I immediately see the consumer reconnect and messages begin being processed again.

If it's relevant, in this case the producer is running NMS on .NET and the consumer is running JMS on Java 1.7.

Ternary
  • 2,401
  • 3
  • 31
  • 54
  • Would it work if you disconnect/re-connec the consumer? Deleteing the queue sounds to be a "bruteforce fix". – SubOptimal Jul 01 '15 at 11:40
  • @SubOptimal good question, I'm actually not sure the answer to that. I don't have any hooks into the application to disconnect/reconnect the consumer while the application is running. Nor do I know of a way to detect that it's in this stuck state since from its point of view, messages just aren't coming in. – Ternary Jul 02 '15 at 13:19
  • 2
    As soon the communication stuck the next time. You might change the logging level for the logger related to class `org.apache.activemq.transport.TransportLogger` to `DEBUG` via the JMX interface using JConsole. Then you should see the broker communication. Maybe this would explain what happen. – SubOptimal Jul 02 '15 at 13:54

2 Answers2

3

When the consumer is connected to the queue, please check the number of uncommitted messages in the queue from the web console. If it is more than zero and does not change for a long time, it means your consumer is having some problem in reading the input message.

If the above case is true, it could be because the producer is sending files that is not jms complaint.

  • This is good stuff to try, I will do this and report back. Thanks! – Ternary Jul 07 '15 at 16:21
  • By "number of uncommitted messages" do you mean the `Number Of Pending Messages` in the console? That value I know is non-zero and if I click on the queue I can see the contents of the message and at least the payload looks valid and in line with what the producer is sending. – Ternary Jul 07 '15 at 16:34
1

I recently ran into this issue while creating a utility to move all messages from one queue into another.

I could see that I was connected to my instance of AMQ, and I could see the listener that I had created, but they just would not move from Pending to my listener...

I had forgotten to call Start() on my queue connection. :/

Jeannine Lee
  • 71
  • 1
  • 5