I have an application which is using the latest snapshot of ActiveMQ 5.0.

I have a master JVM process which sends an item to a work-item queue. I have worker JVM processes which pick up these items, process them, and possibly create new items into the work-item queue as a part of processing these messages.

The master sends a new work-item once the workers have completed all their work.

I have a situation where if there is only one worker JVM process (one consumer), everything works fine. If there are two workers, they complete all of their work, the master sends the next work item to the queue, but they never get notified of this new message.

I know the message is sent, via the JMX console, and that the worker subscriptions are still active.

What is strange is the worker's subscriptions have large PendingQueueSize values, which seems odd, since they aren't processing any more messages. The queue size is 1 after the master sends its new message.

If I create a new worker process, it immediately gets the message from the master!

This happens with or without transactions, and with all sorts of pre-fetch sizes, using the same or separate Connections.

I've started to run the broker in my IDEA debugger to try and understand what is going on - but the fact that the PendingQueueSize are quite large, does this explain why the old workers don't get new messages? Does this sound like a bug?

Any suggestions on what I should look for? I'm happy to dive into the code, but would appreciate some guidance.

Cheers,
David

Reply via email to