jandres
jandres

Reputation: 479

Spring AMQP multi-threaded producer

I have a multi-threaded application that uses a RabbitTemplate (with CachingConnectionFactory) to send messages to the broker. I need to ensure that the messages are delivered in order. I have seen this answer about this myself in: Spring AMQP ensuring message order in multi-threaded environment

Are these the only two options with Spring AMQP? What does a dedicated connection mean? I need to define a new RabbitTemplate with its ConnectionFactory in each java class that serves as the producer?

Thank you!

Upvotes: 2

Views: 940

Answers (1)

Gary Russell
Gary Russell

Reputation: 174574

Versions 2.0 and later now support scoped operations where all operations within the scope of the invoke occur on the same channel.

Of course "in order" can only mean in order within each thread.

Upvotes: 2

Related Questions