10 Replies Latest reply on Nov 11, 2010 4:24 PM by Clebert Suconic

    Poison Message Getting Beyond Selector and Violating Max Delivery Attempts

    jim stafford Newbie

      I have a test scenario running in a loop for hours and days. It is the same input, same processing, same everything, all day long so I know the logic (JMS Selectors, Message Handling, etc.) is right. However, about once a day I encounter a poison message that sends the MDB into an infinite error loop.


      My business logic is wrapped in MDBs and deployed as an EAR to JBoss. The MDBs publish and subscribe to a single, common topic and make use of JMS selectors to assure they only process what they are suppose to.


      The above works 99.9% of the time and when it goes bad, it goes bad for only a single message while the normal flow of other messages continue.

      1) what kind of error would cause a message to bypass the JMS Selector

      2) what kind of message delivery ignores the max-delivery-attempts. The documentation states the default is 10 attempts if nothing is specified. I have nothing specified.


      I know the poison message has all the required properties to de-select on because I end up cornering the message in the server (after undeploying the application) and removing it using the JMX Console removeMessages() JMS message filter.


      The only thing the logs tell me is that the server instantiated a new set of EJB instances to handle the incoming messages at the same time the error condition occured.


      I have since specified the max-delivery-attempts value to see if a specified value works any better than a default value. No data on that yet.


      I am using JBoss 5.1.0.GA and HornetQ 2.1.2.Final. I am running on Ubuntu 64bit server. I am using PAGE-ing and not BLOCKing policy. The problem lessens when I insert a delay between messages and increases in chance when I send messages in larger waves (i.e., send 200 and wait some).