1 of 1 people found this helpful
I'm using Jboss6 and I've noted also some issues using MDB's and even configuring the HornetQRAManagedConnectionFactory to try to connect indefinitely to a remote queue sometimes it doesn't connect I don't know exactly why.
What I doing to detect any problem with this is to count how many consumers has the queue. If there are no consumers on a queue I will be notified because it's sure there is something wrong. To do this I'm using twiddle (the jmx command line) with some scripts to integrate it with nagios.
If you want more details about this, please comment.
Thanks for your response.
I was looking more specifically for a way to track the connection failures from within the app itself so the app could be aware of the failures. We need the app to change its behaviour if it's not going to be able to receive notifications. I suppose we can take this approach then communicate with the app from the external monitoring script via webservice or something.
Yes, I know what you mean. But I haven't found a method to receive connection errors from MDB's. I was waiting to port my application to JBoss7 (I'm still using jboss6) to check if there are a solution for that situation. On the other side I have a standalone application using JMS api to consume messages from a queue and I'm using the exception listener to detect connection failures, works like a charm but you can not use it on MDB's.
The solution you propose is what I'm doing with nagios right now. But I don't need to change so much the behavior of the application if a connection failure is detected, simply notify.