You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by bizcenter <bi...@gmail.com> on 2012/10/23 07:30:36 UTC

How to mintor activemq

When using ActiveMQ, some problems troubles me:
1. When broker crashed or stopped, messages from sender will be lost(I set
timeout, because the sender have others to do).
2. consumer receives all messages from broker, but how i dnow the consumer
received all messages(zero lost). 
3. If message is lost, i want to know it immediatelly.

In production, I want to monitor the activemq, and know which message is
lost.
Can anyone give me a favor?
Thanks very much.
Forgive my poor english...




--
View this message in context: http://activemq.2283324.n4.nabble.com/How-to-mintor-activemq-tp4658072.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How to mintor activemq

Posted by bizcenter <bi...@gmail.com>.
Sorry, I didn't make myself clearly.
For reability, i should not set timeout. But in my business, 2 seconds means
too long. So 'useAsyncSend' and 'sending timeout' is necessary.

Timeout is not message timeout but sending timeout(in 2 seconds),  message
is persisted forever.

In this condition, messaging losing always occurs. So I need to monitor the
lost message.

Can you show me some cases of monitoring in porduction enivronment?

Thanks...



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-to-mintor-activemq-tp4658072p4658075.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How to mintor activemq

Posted by Torsten Mielke <to...@fusesource.com>.
On Oct 23, 2012, at 7:30 AM, bizcenter wrote:

> When using ActiveMQ, some problems troubles me:
> 1. When broker crashed or stopped, messages from sender will be lost(I set
> timeout, because the sender have others to do).
> 2. consumer receives all messages from broker, but how i dnow the consumer
> received all messages(zero lost). 
> 3. If message is lost, i want to know it immediatelly.
> 
> In production, I want to monitor the activemq, and know which message is
> lost.
> Can anyone give me a favor?
> Thanks very much.
> Forgive my poor english...

Assuming you are using persistent messages, your message should be stored inside the brokers persistence adapter until the consumer receives and acknowledges the message. So if the broker crashes before it dispatched the message to the consumer, the broker will generally redeliver the message to the consumer after a restart. This assumes your message has not timed out in between. 
If the broker crashes before it got written to the persistence adapter, then your producer will receive an exception and should be able to resend that message once the broker is available again.
So in general you should not need to loose messages.
The broker should also run quite stable if configured correctly and if a more decent version is used. 


You mention a message timeout. If you are concerned about loosing messages due to timeout, perhaps you should not use a message timeout in that case? 

I am not aware of any tool that would quickly tell you which message you lost due to message timeouts. 
The right debug logging configuration in the broker *may* log whenever a message had a timeout in the broker. But I am not sure which class contains that logging. The question is do you really want to rely on this? 

Finally you could also consider a master slave broker configuration to make your JMS broker highly available.  


Hope this helps as a starting point.

Regards,

Torsten Mielke
torsten@fusesource.com
tmielke@blogspot.com