2 Replies Latest reply on Feb 23, 2007 11:51 AM by Adrian Brock

    Message is redelivered more than once if MDB takes too long

    Jean Croteau Newbie

      We have a situation in our clustered environment.

      Simply put, we receive a message in our JbossMQ server. There is a single MDB instance that gets notified when the message arrives.

      It then calls a Stateless EJB on a node of the cluster. The processing by the EJB is VERY long, somewhere around 15 minutes (which is normal). The problem is that after a certain amount of time, the message gets redelivered even if the Stateless EJB completes normally and the transaction is finished/commited.

      We have absolutely no exceptions, no logs etc. that indicates a problem.

      The jmsRedelivered flag is set to true on the second call. Also, it is to be noted than when the call to the Stateless EJB is made from the MDB on the second try, it is done to another node in the cluster, probably because of the round robin implementation.

      The transaction timeout in the jboss-service.xml is set to a high enough value and as said, there are no Rollbacks done. The MDB is container managed and set to auto consume on a commit. It seems that after a while the Message dispatcher is simply not aware of the successful completion and just redelivers the message.

      Any help / comments or pertinent documentation would be appreciated.