7 Replies Latest reply on Oct 18, 2013 5:22 AM by Andy Taylor

    Messages are not consumed by MDB if long running processes active

    abl-dam Newbie

      in JBossEAP 6.0.1 we are sending JMS messages to start long running background processes. Message are consumed by a MDB with a max of 10 sessions:

       

      @MessageDriven(activationConfig =
      {   @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
          @ActivationConfigProperty(propertyName="destination", propertyValue="queue/workflow"),
          @ActivationConfigProperty(propertyName="maxSession", propertyValue="10")
      })
      @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
      public class WfExecutionMDB extends BaseBeanSL implements MessageListener
      

      this background processes can last from minutes up to 2-3 hours.

      most of the time this works without problems.

       

      but from time to time we see the effect that running processes are blocking new message sent to the queue, although there are MDB sessions left. the messages are not consumed from the queue by the MDB.

      further message are still consumed, but the blocked messages are consumed only until the long running jobs are finished! as an interesting fact, these messages are processed by the same thread as the long running process.

       

      a short example (by the order sent to the queue):

      1. long running job 1 (Thread-4)

      2. long running job 2 (Thread-5)

      3. blocked message for job 3

      4. blocked message for job 4

      5. job 5 (Thread-6) -> consumed and executed

      --- now job 1 finishes ---

      -> job 3 message consumed and executed (on Thread-4)

       

      it "seems" there is some kind of timeout that leads to reusing the HornetQ Thread from Pool, but it's still in use and therefor the job cannot start.

      I consider it is an configuration or usage issue, but I found nothing in the docs or on the web. thanks for any advice.