-
1. Requirements for serial message delivery
ataylor Mar 17, 2011 7:28 AM (in response to timowe1980)if you have 1 producer and 1 consumer per queue then order is gauranteed, are you saying this is not the case?
-
2. Requirements for serial message delivery
timowe1980 Mar 17, 2011 8:13 AM (in response to ataylor)I create a new Session + MessageProducer for each message to be send to the queue. Do I need to reuse the same Session and MessageProducer to get guaranteed message order?
-
3. Requirements for serial message delivery
ataylor Mar 17, 2011 8:24 AM (in response to timowe1980)yes, recreating a new session/connection evry time is an anti pattern as they are heavy weight resources, also use the same producer as order is gauranteed between 2 points (p2p) producer and consumer.
-
4. Requirements for serial message delivery
timowe1980 Mar 17, 2011 8:47 AM (in response to ataylor)Do I also need to reuse the Producer always from the same thread? I tried the approach with one Producer per queue on producer and consumer side, but it didn't help.
-
5. Requirements for serial message delivery
ataylor Mar 17, 2011 9:07 AM (in response to timowe1980)its illegal to call methods concurrently so if you use multiple threads you will have to manage the syncronisation yourself, which i guess defeats th epurpose of using multiple threads
-
6. Requirements for serial message delivery
timowe1980 Mar 17, 2011 9:09 AM (in response to ataylor)I make sure via synchronization that the session + producer is only used from one thread at a time. Maybe the result here is that with multithreaded message production I don't get serial delivery of messages which is quite unfortunate.
-
7. Requirements for serial message delivery
ataylor Mar 17, 2011 9:13 AM (in response to timowe1980)if your synchronisation is correct and you are using a single producer then you *will* get correct ordering of messages.
-
8. Requirements for serial message delivery
timowe1980 Mar 17, 2011 9:15 AM (in response to ataylor)Does the acknowledgeMode affect the delivery? I use AUTO_ACKNOWLEDGE.
-
9. Requirements for serial message delivery
ataylor Mar 17, 2011 9:19 AM (in response to timowe1980)well it effects the semantics of how received messages are acked but not ordering. Maybe you are missing something simple here, if you have 1 producer sending to a single queue with a single consumer then ordering is gauranteed.
-
10. Requirements for serial message delivery
timowe1980 Mar 17, 2011 9:26 AM (in response to ataylor)Thanks for your time. I will further explore the code, maybe something pops up.