Stomp transport - "Connection closed" when sending at high speed
mjustin Feb 21, 2010 5:45 AMHello,
with the current trunk release, I have sucessfully tested sending and receiving of one million messages (producer and consumer running in parallel, on the same Windows Vista system as HornetQ). The producer and consumer console application logs all sent / received messages, which slows down the processing a little.
If I switch off the console log output to test the maximum speed for this configuration, warning messages and stack traces appear in the HornetQ console window. It looks like the broker has lost the connection to the consumer, the stack trace indicates that the exception was thrown in the onSend() method of StompProtocolManager.
The risk of getting this problem depends on the message count sent in one batch. For example if I send 500 messages (with 500 byte each), sending and receiving works fine (and is very fast, up to 5 messages per millisecond). But for higher message count, the warning occurs very frequently and a high percentage of the messages is lost.
This is the log window output (for every undeliverable message):
[org.hornetq.core.protocol.stomp.StompProtocolManager] Connection closed org.ho
rnetq.core.protocol.stomp.StompConnection@df824a
org.hornetq.core.protocol.stomp.StompException: Not connected
at org.hornetq.core.protocol.stomp.StompProtocolManager.checkConnected(S
tompProtocolManager.java:412)
at org.hornetq.core.protocol.stomp.StompProtocolManager.onSend(StompProt
ocolManager.java:472)
at org.hornetq.core.protocol.stomp.StompProtocolManager.doHandleBuffer(S
tompProtocolManager.java:174)
at org.hornetq.core.protocol.stomp.StompProtocolManager.access$000(Stomp
ProtocolManager.java:51)
at org.hornetq.core.protocol.stomp.StompProtocolManager$1.run(StompProto
colManager.java:139)
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(Ordere
dExecutorFactory.java:96)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[Thread-3 (group:HornetQ-server-threads21726407-16408563)] 17:02:41,404 WARNING
[org.hornetq.core.protocol.stomp.StompProtocolManager] Connection closed org.ho
rnetq.core.protocol.stomp.StompConnection@df824a
If time permits I will try to write a test application with the Stomp Java code in HornetQ and on Linux and Windows XP. Maybe it is be a timing problem in the Vista TCP/IP stack. The two Delphi network libraries I am using work in blocking mode and show the same problem.
Regards,
Michael