3 Replies Latest reply on Jan 16, 2014 5:09 PM by Clebert Suconic

    Queue throughput with Spring's DefaultMessageListenerContainer question

    Ralkie Greenwood Newbie

      JMS queue throughput appears to be very low, because all JMS messages not instantly consumed by consumers (managed by Spring's DefaultMessageListenerContainer - DMLC) are delayed by <redelivery-delay> amount of time (!).

       

      To illustrate the behavior let's say 20 messages are put into queue with 3 concurrent consumers waiting and redelivery-delay set to 1 minute. This results in 3 messages instantly consumed

      and 17 waiting for 1 minute. Then 3 more messages are consumed and remaining 14 are still "scheduled", etc. For this scenario it takes 6+ minutes to consume 20 messages by 3 consumers.

       

      Consumer works on received message for less than 1 second, so all remaining redelivery-delay time (59+ secs) DMLC is constantly polling queue for messages but none are available.

      No application or server level exceptions are thrown, so why this "redelivery" is happening is unclear. What is more, <max-delivery-attempts> is ignored, so it does not seem to be "real" redelivery.

       

      It would be nice to understand what's going on and how to fix/avoid that. I'm pretty new to JBoss so any suggestions are welcome.

       

      NB! DMLC is configured to have external transaction manager (JTA), with cacheLevel "CACHE_AUTO" (which I believe results in default "CACHE_NONE").

       

      HornetQ configuration:

      <subsystem xmlns="urn:jboss:domain:messaging:1.1">

        <hornetq-server>

        <persistence-enabled>true</persistence-enabled>

        <message-counter-enabled>true</message-counter-enabled>

        <journal-type>NIO</journal-type>

        <journal-file-size>10240000</journal-file-size>

        <journal-min-files>2</journal-min-files>

       

       

        <connectors>

        <in-vm-connector name="in-vm" server-id="0"/>

        </connectors>

       

       

        <acceptors>

        <in-vm-acceptor name="in-vm" server-id="0"/>

        </acceptors>

       

       

        <security-settings>

        <security-setting match="#">

        <permission type="send" roles="guest"/>

        <permission type="consume" roles="guest"/>

        <permission type="createNonDurableQueue" roles="guest"/>

        <permission type="deleteNonDurableQueue" roles="guest"/>

        </security-setting>

        </security-settings>

       

       

        <address-settings>

        <address-setting match="jms.queue.inboxRetrieveMessage">

        <dead-letter-address>jms.queue.error</dead-letter-address>

        <expiry-address>jms.queue.error</expiry-address>

        <redelivery-delay>60000</redelivery-delay>

        <max-delivery-attempts>12</max-delivery-attempts>

        <max-size-bytes>10485760</max-size-bytes>

        <address-full-policy>BLOCK</address-full-policy>

        <message-counter-history-day-limit>10</message-counter-history-day-limit>

        </address-setting>

        <...>

        <address-setting match="jms.queue.error">

        <dead-letter-address>jms.queue.DLQ</dead-letter-address>

        <expiry-address>jms.queue.ExpiryQueue</expiry-address>

        <redelivery-delay>0</redelivery-delay>

        <max-delivery-attempts>0</max-delivery-attempts>

        <max-size-bytes>10485760</max-size-bytes>

        <address-full-policy>BLOCK</address-full-policy>

        <message-counter-history-day-limit>10</message-counter-history-day-limit>

        </address-setting>

        </address-settings>

       

       

        <jms-connection-factories>

        <connection-factory name="InVmConnectionFactory">

        <connectors>

        <connector-ref connector-name="in-vm"/>

        </connectors>

        <entries>

        <entry name="java:jboss/jms/ConnectionFactory"/>

        <entry name="jms/ConnectionFactory"/>

        </entries>

        </connection-factory>

        <pooled-connection-factory name="hornetq-ra">

        <transaction mode="xa"/>

        <connectors>

        <connector-ref connector-name="in-vm"/>

        </connectors>

        <entries>

        <entry name="java:jboss/jms/AdapterConnectionFactory"/>

        <entry name="jms/AdapterConnectionFactory"/>

        </entries>

        </pooled-connection-factory>

        </jms-connection-factories>

       

       

        <jms-destinations>

        <jms-queue name="inboxRetrieveMessage">

        <entry name="java:jboss/jms/AdapterInboxRetrieveMessageJMSQueue"/>

        <entry name="jms/AdapterInboxRetrieveMessageJMSQueue"/>

        <durable>true</durable>

        </jms-queue>

        <...>

        </jms-destinations>

        </hornetq-server>

      </subsystem>