[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Semantic on Session.stop and MessageHandler

ataylor do-not-reply at jboss.com
Wed Mar 25 05:37:16 EDT 2009


anonymous wrote : A couple of issues with the latest commit:
  | 
  | 1) The logic in setMessageHandler() doesn't look right:
  | 
  | When setting a non null message handler, then it remains stopped so any messages won't get delivered.
  | 
  | Messages are being requeued if the previous handler was null but even if the current handler is null 

correct, I'll add a test and fix

anonymous wrote : 2) receive() method:
  | 
  | while ((stopped || (m = buffer.poll()) == null) && !closed && toWait > 0)
  | 
  | It will stay in the loop as long as the consumer is stopped. This is not correct - receive should always return after timeout, it's just that if it's stopped then it should always return null. 

are you sure? ClientConsumerTest:testStopStartConsumerSyncReceive() tests for this.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4220840#4220840

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4220840



More information about the jboss-dev-forums mailing list