简体   繁体   中英

Use case of transaction in Spring AMQP

I am trying to understand Spring AMQP. I can't get my head aroud thetransaction .

What is the use case of transaction? Is it similar to JTA? Why would someone rollback a Message ?

See the documentation about transaction semantics .

No, it's not "similar to JTA" it applies only to RabbitMQ itself - it can't participate in a global transaction.

One use case:

  • publish multiple records and one fails - then all are rolled back

ie all published records are secured in the broker, or none are.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM