Losing STOMP consumer ocasionally
kesavkolla Sep 16, 2011 2:45 PMWe have a STOMP Websockets client from our UI application, which connects to Hronet topic. We are using JBoss 6.1.0 and configured the topic like the following:
<topic name="LogTopic">
<entry name="/topic/LogTopic"/>
</topic>
We subscribe to this topic and send/receive messages. Ocasinally we see some of the clients fail to receive messages and I can see the following error in the log file:
2011-09-16 10:55:07,425 WARN [org.hornetq.core.server.impl.QueueImpl] (Thread-17 (group:HornetQ-server-threads1683676786-1973868001)) removing consumer which did not handle a message, consumer=org.hornetq.core.server.impl.ServerConsumerImpl@66724953, message=Reference[4295367188]:NON-RELIABLE:ServerMessage[messageID=4295367188,priority=4,expiration=0, durable=false, address=jms.topic.MgrTopic,properties=TypedProperties[{PROCESSID=96113, TASKID=C191, DESTVIEW=ENGINEER, CATEGORY=CACHE}]]: java.lang.OutOfMemoryError: Java heap space
at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readSimpleStringInternal(ChannelBufferWrapper.java:83) [:6.1.0.Final]
at org.hornetq.core.buffers.impl.ChannelBufferWrapper.readNullableSimpleString(ChannelBufferWrapper.java:58) [:6.1.0.Final]
at org.hornetq.core.protocol.stomp.StompSession.sendMessage(StompSession.java:108) [:6.1.0.Final]
at org.hornetq.core.server.impl.ServerConsumerImpl.deliverStandardMessage(ServerConsumerImpl.java:704) [:6.1.0.Final]
at org.hornetq.core.server.impl.ServerConsumerImpl.handle(ServerConsumerImpl.java:291) [:6.1.0.Final]
at org.hornetq.core.server.impl.QueueImpl.handle(QueueImpl.java:2017) [:6.1.0.Final]
at org.hornetq.core.server.impl.QueueImpl.deliver(QueueImpl.java:1587) [:6.1.0.Final]
at org.hornetq.core.server.impl.QueueImpl.doPoll(QueueImpl.java:1472) [:6.1.0.Final]
at org.hornetq.core.server.impl.QueueImpl.access$1100(QueueImpl.java:72) [:6.1.0.Final]
at org.hornetq.core.server.impl.QueueImpl$ConcurrentPoller.run(QueueImpl.java:2299) [:6.1.0.Final]
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [:6.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
2011-09-16 10:55:07,426 ERROR [org.hornetq.utils.OrderedExecutorFactory] (Thread-17 (group:HornetQ-server-threads1683676786-1973868001)) Caught unexpected Throwable: java.util.NoSuchElementException
at org.hornetq.utils.PriorityLinkedListImpl$PriorityLinkedListIterator.repeat(PriorityLinkedListImpl.java:189) [:6.1.0.Final]
at org.hornetq.core.server.impl.QueueImpl.deliver(QueueImpl.java:1604) [:6.1.0.Final]
at org.hornetq.core.server.impl.QueueImpl.doPoll(QueueImpl.java:1472) [:6.1.0.Final]
at org.hornetq.core.server.impl.QueueImpl.access$1100(QueueImpl.java:72) [:6.1.0.Final]
at org.hornetq.core.server.impl.QueueImpl$ConcurrentPoller.run(QueueImpl.java:2299) [:6.1.0.Final]
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [:6.1.0.Final]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
When this error happens the client becomes dead can't receive any further message. The message itself is very tiny there is no reason to suspect a heap out of space for processing that message. Our JBoss server functions well under limits of memory no issues there. Only the STOMP client gets disconnected.
On the client side I can probably detect the connection loss and reconnect again but the message is lost completely.
Any one can suggest me how to handle these sort of situations? How to get these messages reliably over STOMP?
Thanks in advance.