0 Replies Latest reply on Feb 23, 2019 4:46 AM by alpeshjikadra

    HornetQ does not delivered already queued messages if one of the consumer is taking longer time

    alpeshjikadra

      Hi

      I am working on production issue when I am using following technologies

       

      Wildfly 9.0.2

      Spring 4.3

      HornetQ 4.2.7

       

      I have configured 20 concurrent consumer in spring using org.springframework.jms.listener.DefaultMessageListenerContainer,

      I am using netty connection for hornetq, in wildfly, following is the configuration in

       

      <connection-factory name="RemoteConnectionFactory">

          <connectors>

             <connector-ref connector-name="netty"/>

          </connectors>

          <entries>

             <entry name="RemoteConnectionFactory"/>

             <entry name="java:jboss/exported/RemoteConnectionFactory"/>

           </entries>

           <block-on-non-durable-send>false</block-on-non-durable-send>

           <block-on-durable-send>false</block-on-durable-send>

           <consumer-window-size>0</consumer-window-size>

      </connection-factory>

       

      Issue if following condition occurs.

       

      1. First message is received by client and it is taking around 5 minutes to complete

      2. Next 19 messages are send and received by remaining 19 consumer then this all get consumed by each consumer, these all complete withing few seconds,let say(10 seconds)

      3. Now if I send 1 message, but this will not delivered to client as all consumers are busy and it goes into queue, But After completion of above 19th messages all consumers are free, but still last messages is in queue (not get delivered to consumer). This message will only be delivered once first message (of 5 Minute) is complete.

      4.After completion of 19th message if I send new message then this will be immediately delivered to consumer, but above single message is still in queue.

       

      Can someone please tell me how to solve this issue, that if any consumer free then it should pick up next message immediately.

       

      I have also prepared demo and uploaded on github.

       

      Let me know if more information is needed.