1 Reply Latest reply on Sep 7, 2011 3:43 AM by Andy Taylor

    Delivering count is not in sync with number of consumers.

    Labdhi Shah Newbie

      I am using standalone HornetQ 2.2.5.Final version. paging is enabeled and schedule delivery feature is in use.

      journal size is 400 MB and page file

       

      size is 10 MB.

      using plain JMS transactions instead of

       

      JTA. application is multithreaded with dozens of producers and more than 50 concurrent consumers around 20 Queues

      Spring is used to produce and consume the messages.

      CachingConnectionFactory is used to wrap the HornetQQueueConnectionFactory and various JMS admin objects like connection, session and message producers are cached by Spring.

      DefaultMessageListenerContainers provided by Spring are in use to pull the message fom HornetQ. at the time of pulling the message JMS session in use is transacted and transaction is a local JMS transaction. jta is not in use in short thruout.

      ConsumerWindowSize is set to 0 on to ensure that only one message will get pulled at a time per consumer thread. as and when consumer thread is done with one message[either commit or rollback] it pulls another message from HornetQ.

      HornetQ is running as standalone process on a different node. producers and consumers are remotely connecting to it.

       

      I am under the impresion that in this kind of arrangement numbers appearing in delivering count and consumer count in jconsole for a given JMS Queue should be in sync. for example if Spring has instantiated 10 threads to pull messages from a given Queue then delivering count shouldn't ideally exceed 10 for that given Queue. In application i am noticing that this is true most of teh time but at few times this number gets off by a very weired count. e.g i have 10 conumer threads but deliveringCount appears as 2000. how is it possible?

      earlier I was using <persist-delivery-count-before-delivery>true </persist-delivery-count-before-delivery> but later on i changed it to false because to avoid message stuck problem.

       

      I just want to know whether having deliveringCount off against the expectation can lead to any issue or not in production environment.

       

       

      my  hornetq-configuration.xml is given below.

       

       

      <configuration xmlns="urn:hornetq"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="urn:hornetq /schema/hornetq-configuration.xsd">

         <acceptors>
            <acceptor name="netty">
               <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
               <param key="host"  value="${hostname}"/>
               <param key="port"  value="${livePort}"/>
               <param key="use-nio"  value="true"/>
            </acceptor>
            <acceptor name="netty_localhsot">
               <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class>
               <param key="host"  value="localhost"/>
               <param key="port"  value="${livePort}"/>
               <param key="use-nio"  value="true"/>
            </acceptor>
         </acceptors> 

      <address-settings>
            <!--default for catch all-->
             <address-setting match="jms.queue.ConsumerUpdateRequestQueue">
               <dead-letter-address>jms.queue.consumerupdate.ExceptionQueue</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.ConsumerUpdateRetryQueue">
               <dead-letter-address>jms.queue.chargesandpayments.ExceptionQueue</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.EventDistributionQueue">
               <dead-letter-address>jms.queue.notification.ExceptionQueue</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${EDQ_queueDataInMemory}</max-size-bytes>
            </address-setting>
            <address-setting match="jms.queue.consumerupdate.DeadUpdateQueue">
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
               <max-delivery-attempts>-1</max-delivery-attempts>
               <redelivery-delay>60000</redelivery-delay>
            </address-setting>
            <address-setting match="jms.queue.notification.DeadEventQueue">
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
               <max-delivery-attempts>-1</max-delivery-attempts>
               <redelivery-delay>60000</redelivery-delay>
            </address-setting>
            <address-setting match="jms.queue.mail.DeadLetterQueue">
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
               <max-delivery-attempts>-1</max-delivery-attempts>
               <redelivery-delay>60000</redelivery-delay>
            </address-setting>
            <address-setting match="jms.queue.chargesandpayments.DeadMessageQueue">
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
               <max-delivery-attempts>-1</max-delivery-attempts>
               <redelivery-delay>60000</redelivery-delay>
            </address-setting>
            <address-setting match="jms.queue.chargesandpayments.DeadMessageQueues">
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
               <max-delivery-attempts>-1</max-delivery-attempts>
               <redelivery-delay>60000</redelivery-delay>
            </address-setting>
            <address-setting match="jms.queue.osn.ExternalNotificationDeliveryDeadQueue">
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
               <max-delivery-attempts>-1</max-delivery-attempts>
               <redelivery-delay>60000</redelivery-delay>
            </address-setting>
            <address-setting match="jms.queue.extnotification.ExternalNotificationRedeliveryDeadQueue">
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
               <max-delivery-attempts>-1</max-delivery-attempts>
               <redelivery-delay>60000</redelivery-delay>
            </address-setting>
            <address-setting match="jms.queue.extnotification.ExternalNotificationRedeliveryQueue">
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
               <max-delivery-attempts>-1</max-delivery-attempts>
               <redelivery-delay>60000</redelivery-delay>
            </address-setting>
            <address-setting match="jms.queue.HeuristicHazardsQueue">
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
            <address-setting match="jms.queue.osn.ExternalNotificationDeliveryQueue">
               <dead-letter-address>jms.queue.extnotification.ExternalNotificationRedeliveryQueue</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${ENDQ_queueDataInMemory}</max-size-bytes>
            </address-setting>
            <address-setting match="jms.queue.BillingRequestQueue">
               <max-size-bytes>${BRQ_queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.MailQueue">
               <dead-letter-address>jms.queue.mail.ExceptionQueue</dead-letter-address>
               <max-delivery-attempts>3</max-delivery-attempts>
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.PaymentAdaptorRequestQueue">
               <dead-letter-address>jms.queue.chargesandpayments.ExceptionQueue</dead-letter-address>
               <max-delivery-attempts>-1</max-delivery-attempts>
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.PaymentAdaptorResponseQueue">
               <dead-letter-address>jms.queue.chargesandpayments.DeadMessageQueues</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${PARQ_queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.PaymentAdaptorRetryQueue">
               <dead-letter-address>jms.queue.chargesandpayments.DeadMessageQueues</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.notification.RedeliveryQueue">
               <dead-letter-address>jms.queue.notification.ExceptionQueue</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.consumerupdate.ExceptionQueue">
               <dead-letter-address>jms.queue.consumerupdate.DeadUpdateQueue</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.chargesandpayments.ExceptionQueue">
               <dead-letter-address>jms.queue.chargesandpayments.DeadMessageQueue</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.extnotification.ExceptionQueue">
               <dead-letter-address>jms.queue.extnotification.ExternalNotificationRedeliveryDeadQueue</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.mail.ExceptionQueue">
               <dead-letter-address>jms.queue.mail.DeadLetterQueue</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
             <address-setting match="jms.queue.notification.ExceptionQueue">
               <dead-letter-address>jms.queue.notification.DeadEventQueue</dead-letter-address>
               <max-delivery-attempts>1</max-delivery-attempts>
               <max-size-bytes>${queueDataInMemory}</max-size-bytes>
            </address-setting>
            ${customHornetQCoreQueueConfiguration}
         </address-settings>
         <jmx-domain>com.qpass</jmx-domain>
         <paging-directory>${data_dir}/paging</paging-directory>
         <bindings-directory>${data_dir}/bindings</bindings-directory>
         <journal-directory>${data_dir}/journal</journal-directory>
         <large-messages-directory>${data_dir}/large-messages</large-messages-directory>
         <journal-file-size>${journalSize}</journal-file-size>
         <journal-min-files>3</journal-min-files>
         <journal-type>NIO</journal-type>
         <id-cache-size>1</id-cache-size>
         <persist-id-cache>false</persist-id-cache>
         <security-enabled>false</security-enabled>
         <remoting-interceptors>
            <class-name>com.qpass.service.jms.ScheduledDeliveryInterceptor</class-name>
         </remoting-interceptors>
         <message-counter-enabled>true</message-counter-enabled>
         <persist-delivery-count-before-delivery>false</persist-delivery-count-before-delivery>
         <message-counter-sample-period>300000</message-counter-sample-period>
         <message-counter-max-day-history>2</message-counter-max-day-history>
         <message-expiry-scan-period>600000</message-expiry-scan-period>
         <message-expiry-thread-priority>1</message-expiry-thread-priority>
         <memory-measure-interval>180000</memory-measure-interval>
         ${customHornetQCoreConfiguration}
      </configuration>