4 Replies Latest reply on Sep 29, 2010 6:16 AM by veitg

    MDB stops receiving messages although some exist

    veitg

      Hi.

       

      We've got a problem with MDBs that stop receiving messages from hornetq although matching
      messages exist in the queue.

       

      Our Environment:

       

      - JBoss 5.1.0 running on JDK6
      - HornetQ 2.1.2 (integrated via build.sh by hornetQ package, default settings)
      - Additional "request" Queue
      - A MDB that listens on that queue with two different selectors.
        The two MDB instances with their different selectors are configured
        within the ejb-jar.xml (same ejb-class, different ejb-name, different selectors).

       

      MDB instance A listens on message type A, MDB instance B listens on message type B.

       

      Now we create 20 A messages with a size of 3 MB and send them to the queue. The MDB that
      listens on A gets these messages and processes them. Then we send a B message to the
      queue (1-10k in size) and MDB that listens on B processes it. So far so well.
      We repeat this usecase several times.

       

      Now suddenly it happens that only the first 10 messages of A get processed and the
      MDB stops receiving the other 10 messages in the queue. If we restart the server,
      the remaining 10 A messages get processed. We can also make it work again
      when we stop the MDB A instance (via JBoss JMX-Console, under jboss.j2ee) and start
      it again. What really weird is, if we don't restart the MDB and simply add another
      20 A messages to the queue, the first 10 NEW A messages get processed - and only
      these ones. So 20 A messages (10 from the first request, 10 from the second) are left
      in the queue unprocessed. Stopping the MDB A and starting it again processes ALL 20
      left messages from the queue.

       

      Looking at the queue with hermesJMS from external, shows the related messages on
      the queue. Using a selector we're able to filter these messages as expected (using
      the _exact_ same message selector from the MDB).

       

      It also happens from time to time, that messages from B aren't processed too.
      Then only one B message is left in the queue and isn't processed (no other messages
      exist in the queue at that time). Stop/Start make it work again.

       

      Any hints what that might be?