3 Replies Latest reply on Jul 1, 2019 11:03 AM by jbertram

    Delay in Consuming messages from JMS topic

    vignesh5989

      There are intermittent delays in consuming messages from jms topic. We have used a DurableTopic and MDB to consume messages.

      Any idea or suggestion would be helpful?

        • 1. Re: Delay in Consuming messages from JMS topic
          jbertram

          My recommendation would be to gather multiple thread dumps while the delay is happening and then look to see what the MDB threads are doing. My guess is that they're busy in some kind of blocking operation that is preventing them from consuming more messages.

          • 2. Re: Delay in Consuming messages from JMS topic
            vignesh5989

            Thanks Justin for the Response. it looks like some of the messages are picked up only after the restart. From the logs, i assume it is only picked now for the first time.
            It is not redelivered (msg.getJMSRedelivered is false).

             

            This issue is intermittent . Wondering why the message is not consumed the first time and consumed only after restart.

             

            Here's my code..

             

            @MessageDriven(name = "NotificationDeviceManagementBean", activationConfig = {

            @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),

            @ActivationConfigProperty(propertyName = "destination", propertyValue = "topic/DeviceManagement"),

            @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),

            @ActivationConfigProperty(propertyName = "subscriptionDurability", propertyValue = "Durable"),

            @ActivationConfigProperty(propertyName = "clientId", propertyValue = "deviceManagement"),

            @ActivationConfigProperty(propertyName = "maxSessions", propertyValue = "30")

             

            and the mdb-strict-max-pool is set to 40 .. <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

             

            NO Exception or error in logs.

            • 3. Re: Delay in Consuming messages from JMS topic
              jbertram

              My recommendation is still the same. Get thread dumps so you can see what the MDB threads are actually doing (if anything).