Crashed HornetQ JMS clients retain messages in the buffer
Issue
We have a simple HornetQ/jms client that writes some TextMessages with a delay of 5 seconds to a configured queue. A second client reads messages from this queue, when this client crashes (or is stopped by ctrl-c) and restarted, the new client does not receive every second message immediately, these messages are received when the first client session times out on the JBoss server.
- The JBoss/HornetQ documentation says to set the consumer-window-size and producer-window-size to zero to avoid this behaviour, but that does not work.
- Our ConnectionFactory is configured in the standalone-ha.xml
<jms-connection-factories>
<connection-factory name="InVmConnectionFactory">
<connectors>
<connector-ref connector-name="in-vm"/>
</connectors>
<entries>
<entry name="java:/ConnectionFactory"/>
</entries>
<consumer-window-size>0</consumer-window-size>
<producer-window-size>0</producer-window-size>
</connection-factory>
<connection-factory name="RemoteConnectionFactory">
<connectors>
<connector-ref connector-name="netty"/>
</connectors>
<entries>
<entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
</entries>
<consumer-window-size>0</consumer-window-size>
<producer-window-size>0</producer-window-size>
</connection-factory>
</jms-connection-factories>
- Steps to reproduce
- Start the Writer class
- Start the Reader class and wait for some messages to receive
- Stop the Reader class, wait some seconds for the Writer to write some new messages.
- Start the Reader again and see that some messages are "lost" and are received when the first session got a timeout on the JBoss.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
