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
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user