[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Semantic on Session.stop and MessageHandler
timfox
do-not-reply at jboss.com
Tue Mar 24 08:21:29 EDT 2009
To implement stop() on the clientconsumer, just need to wait until the currently executing runnable is complete, then cancelling all the other queued runnable (there'll be one queued runnable per message).
Then, on start() just recreate the runnables and execute() them.
Also need to make sure receive() doesn't return non null called when consumer is stopped.
Same behaviour should exist when close()'ing and when setting messagehandler to null.
The current waitForOnMessageToComplete method waits for *all* messages in buffer to complete, which is not necessary.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220558#4220558
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4220558
More information about the jboss-dev-forums
mailing list