Reputation: 7549
I am not sure if the issue is related to synchronization or more like transaction management, but my current goal is to implement a module by Spring like this:
The key is make sure to prevent a message to receive by more than one receiver, that's all.
I have finished 1,2,3 but confuse about 4, I find this thread helpful, but I am not sure it can resolve above situation, also at same time I wonder if without JTA transaction management from Spring, can standard JMS or JMS provider(ActiveMQ, Websphere MQ, JBoss HonetQ etc) provide any configuration so that can guarantee one message can only be received or process by only one receiver?
Upvotes: 2
Views: 984
Reputation: 2152
Read this . As Gary already mentioned, the message on queue are always received by single consumer irrespective of number subscribers. This is true with/without transactions.
Upvotes: 1
Reputation: 174554
That's the way JMS works. Only one consumer will get each message as long as you use a queue and not a topic.
Upvotes: 1