Tuesday, September 29, 2009

Client needs to help ensure 'guaranteed delivery' with JMS

We recently received a new defect report claiming that some of our data was not being distributed correctly through JMS. Actually some of the data was not being distributed at all!  That's the first time we have heard that complaint - hey, JMS is guaranteed delivery, right?  Well not so fast...

Apparently we had a 'slow leak' in our connection pool within JBoss MQ.  After a few days of uptime, the server seemed to stop distributing some of our data.  The problem helped expose a deficiency in our JMS client code.  We had not registered an ExceptionListener with our Connection object and as a result, we were not notified of problems creating a new Connection.  I don't know about everyone else but most of the JMS sample client code that I have seen hasn't registered an ExceptionListener so that interface was news to me.   Oh well, another learning experience!

So... JMS guaranteed delivery requires some assistance from the client as well, to help handle connection errors.

No comments:

Post a Comment