[
http://jira.jboss.com/jira/browse/JBMESSAGING-926?page=comments#action_12... ]
Sergey Koshcheyev commented on JBMESSAGING-926:
-----------------------------------------------
I now have a test case reproducing this bug, but I have no idea how to fix it.
The problem is apparently that if removeAllMessages is called while a session is in
progress, the message count is set to 0 but messages buffered in MessageCallbackHandler
are not cleared and can be received later in the session, so you can in fact receive a
message after all messages have been removed. Receiving such a message causes the queue
message count to go negative.
So, would the solution be to flush the MessageCallbackHandler buffer when
removeAllMessages called? Is this at all possible? From the code it looks like the queue
would have to message all its consumers when all messages are removed so that the
consumers clear their buffers. Is there some other alternative?
Negative message count
----------------------
Key: JBMESSAGING-926
URL:
http://jira.jboss.com/jira/browse/JBMESSAGING-926
Project: JBoss Messaging
Issue Type: Bug
Affects Versions: 1.2.0.GA
Environment: any
Reporter: Kurt Stam
Assigned To: Sergey Koshcheyev
Fix For: 1.2.0.SP2
Attachments: screenshot-1.jpg
When I removeAllMessages from the Queue while the thing is working on the queue, I can
get a negative message count (see screenshot) I thought this was a funny bug :).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira