From: <ad...@jb...> - 2005-11-15 20:25:43
|
Nope, just a *stupid* receiver class. Because it only waits for 1 milli-second, you are see nacks back to the server because you do a receive(1) request then stop waiting. Which JBoss correct reports later as messages (1 and 2) being redelivered | message.getJMSRedelivered() | Once redelivery is involved, ordering is out of the window. Change the test to wait for a reasonable amount of time receive(100ms) // 0.1 seconds and then you won't have this receive/stop waiting/nack race condition. | Queue name is queue/testQueue | Reading message: SpyTextMessage { | Header { | jmsDestination : QUEUE.testQueue | jmsDeliveryMode : 2 | jmsExpiration : 0 | jmsPriority : 4 | jmsMessageID : ID:43-11320851124363 | jmsTimeStamp : 1132085112436 | jmsCorrelationID: null | jmsReplyTo : null | jmsType : null | jmsRedelivered : false | jmsProperties : {} | jmsPropReadWrite: false | msgReadOnly : true | producerClientId: ID:43 | } | Body { | text :This is message 3 | } | } | Reading message: SpyTextMessage { | Header { | jmsDestination : QUEUE.testQueue | jmsDeliveryMode : 2 | jmsExpiration : 0 | jmsPriority : 4 | jmsMessageID : ID:43-11320851124251 | jmsTimeStamp : 1132085112425 | jmsCorrelationID: null | jmsReplyTo : null | jmsType : null | jmsRedelivered : true | jmsProperties : {JMS_JBOSS_REDELIVERY_COUNT=1} | jmsPropReadWrite: false | msgReadOnly : true | producerClientId: ID:43 | } | Body { | text :This is message 1 | } | } | Reading message: SpyTextMessage { | Header { | jmsDestination : QUEUE.testQueue | jmsDeliveryMode : 2 | jmsExpiration : 0 | jmsPriority : 4 | jmsMessageID : ID:43-11320851124332 | jmsTimeStamp : 1132085112433 | jmsCorrelationID: null | jmsReplyTo : null | jmsType : null | jmsRedelivered : true | jmsProperties : {JMS_JBOSS_REDELIVERY_COUNT=1} | jmsPropReadWrite: false | msgReadOnly : true | producerClientId: ID:43 | } | Body { | text :This is message 2 | } | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3907280#3907280 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3907280 |