[jboss-user] [JBoss Messaging] - Re: JBoss Messaging cluster : Some messages takes 2 to 6 seconds to deliver

Sudeep Pillai do-not-reply at jboss.com
Thu Jun 14 23:37:33 EDT 2012


Sudeep Pillai [https://community.jboss.org/people/sudeeppillai] created the discussion

"Re: JBoss Messaging cluster : Some messages takes 2 to 6 seconds to deliver"

To view the discussion, visit: https://community.jboss.org/message/741880#741880

--------------------------------------------------------------
Even with enableTcpNoDelay flag set, we experienced high delayed messages. Finally, root cause was identified. We have multiple Consumers for single message queue listening to Messages in its own threads(one thread per consumer). When a consumer receives a message, its thread process that message and at the end of processing calls consumer.receive(timeout) and waits for the next message. Processing time of a message in consumer threads can vary with some message processing taking few seconds.

Problem is JBoss will stream message to the above consumer, which has not called receive method, even though there are other consumers which have called receive method and waiting. If this scenario happens, second message streamed to that consumer will be processed once the consumer thread is free. We avoided this by closing the consumer soon after receive returns a message. When the thread is ready for the next message, create a new consumer and call receive on the new consumer.

Hope this helps.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/741880#741880]

Start a new discussion in JBoss Messaging at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2042]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120614/bec96ed7/attachment-0001.html 


More information about the jboss-user mailing list