You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by tmurray <to...@psydex.com> on 2010/03/09 04:20:38 UTC

MessageConsumer stops receiving messages

Environment
ActiveMQ-5.3.0 standalone
Java 1.6.0_11
Fedora 10

Using publish/subscribe (TOPICS) in non persistent messaging mode.  The
ActiveMQ broker is setup with persistent=false.

Publisher is sending an ObjectMessage every 5 seconds.  I have one message
consumer subscribing to the Topic.   The message consumer receives the first
5 messages, without any issues.  Thereafter, no messages are received by the
consumer.  The consumer is setup for async processing using the
MessageListener onMessage(Message msg) method.   Reviewing the ActiveMQ
Topic console, the Messages Enqueued continues to rise every time a message
is published. However, the Messages Dequeued stops at 5.  I don't see any
errors in the ActiveMQ log, and the consumer appears to be waiting for
messages.  Any suggestions would be appreciated.

Thanks in advance for your assistance,

T

-- 
View this message in context: http://old.nabble.com/MessageConsumer-stops-receiving-messages-tp27830923p27830923.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: MessageConsumer stops receiving messages

Posted by tmurray <to...@psydex.com>.
Thanks.  I figured out the problem had nothing to do with ACTIVEMQ.  The
onMessage method was calling a DB function which was blocking.  

T



Márcio Geovani Jasinski wrote:
> 
> Hi Tom,
> 
> This is pretty strange behavior - looks like your consumer is not running
> after a while.
> I think you should separate the code (pub/sub) and then start a second
> consumer when first is no longer taking messages from the queue.
> In case second consumer stops after another 5 messages - you know the
> problem resides on you consumer code.
> 
> Check whether your consumer has message or some timeout limitation.
> 
> -- 
> Márcio Geovani Jasinski
> Blumenau, Santa Catarina
> 
> 

-- 
View this message in context: http://old.nabble.com/MessageConsumer-stops-receiving-messages-tp27830923p27837601.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: MessageConsumer stops receiving messages

Posted by Márcio Geovani Jasinski <ma...@gmail.com>.
Hi Tom,

This is pretty strange behavior - looks like your consumer is not running
after a while.
I think you should separate the code (pub/sub) and then start a second
consumer when first is no longer taking messages from the queue.
In case second consumer stops after another 5 messages - you know the
problem resides on you consumer code.

Check whether your consumer has message or some timeout limitation.

-- 
Márcio Geovani Jasinski
Blumenau, Santa Catarina