Transactions

Transactions are used to wrap a block of asynchronous operations to make them synchronous as well as atomic. The cost is in performance, both in terms of the server providing atomicity and added round-trip time in communicating with the server.

Channel.tx_select()

This method sets the channel to use standard transactions.

The client must use this method at least once on a channel before using the Commit or Rollback methods.

Channel.tx_commit()

This method commits all message publications and acknowledgments performed in the current transaction.

A new transaction starts immediately after a commit.

Channel.tx_rollback()

This method abandons all message publications and acknowledgments performed in the current transaction.

A new transaction starts immediately after a rollback. Note that unacked messages will not be automatically redelivered by rollback; if that is required an explicit recover call should be issued.

Previous topic

Consuming messages

Next topic

Glossary

This Page