You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mikmela <mi...@yahoo.com> on 2013/02/14 17:22:37 UTC

How to get niotified when broker service stops

There is a situation when JDBC persistence adapter simply stops the broker
service. This is happening  when database locker's keepAlive  check fails
due to some database issues... What would be the best way to get notified
about it... In other words, is any way to register a an observer object? or
may be there are other ways?



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-to-get-niotified-when-broker-service-stops-tp4663430.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How to get niotified when broker service stops

Posted by mikmela <mi...@yahoo.com>.
My concern is that in cases when there are no messages to persist and the
next thing that does db access is keepAlive()... It  won't notify
IOExceptionHandler, instead just returning "false" and, consequently,
stopBroker() will be called silently... I got yet to try this scenario.. 




--
View this message in context: http://activemq.2283324.n4.nabble.com/How-to-get-notified-when-broker-service-stops-tp4663430p4663438.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How to get niotified when broker service stops

Posted by Christian Posta <ch...@gmail.com>.
Yep, that might be a better way to go for getting notified of persistence
IO exceptions.


On Thu, Feb 14, 2013 at 9:51 AM, mikmela <mi...@yahoo.com> wrote:

> Thanks Christian. I've been thinking along lighter
> broker.setIoExceptionHandler()  way, but looks likes keepAlive eats up all
> exceptions?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/How-to-get-notified-when-broker-service-stops-tp4663430p4663434.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Re: How to get niotified when broker service stops

Posted by mikmela <mi...@yahoo.com>.
Thanks Christian. I've been thinking along lighter
broker.setIoExceptionHandler()  way, but looks likes keepAlive eats up all
exceptions? 



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-to-get-notified-when-broker-service-stops-tp4663430p4663434.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How to get niotified when broker service stops

Posted by Christian Posta <ch...@gmail.com>.
you could register a custom broker plugin and implement the stop() method
to notify you in some way. if you use some monitoring tools like nagios you
could create an alert.




On Thu, Feb 14, 2013 at 9:22 AM, mikmela <mi...@yahoo.com> wrote:

> There is a situation when JDBC persistence adapter simply stops the broker
> service. This is happening  when database locker's keepAlive  check fails
> due to some database issues... What would be the best way to get notified
> about it... In other words, is any way to register a an observer object? or
> may be there are other ways?
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/How-to-get-niotified-when-broker-service-stops-tp4663430.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta