package amqp-client-async

  1. Overview
  2. Docs

Module Spec.TxSource

The Tx class allows publish and ack operations to be batched into atomic units of work. The intention is that all publish and ack requests issued within a transaction will complete successfully or none of them will. Servers SHOULD implement atomic transactions at least where all publish or ack requests affect a single queue. Transactions that cover multiple queues may be non-atomic, given that queues can be created and destroyed asynchronously, and such events do not form part of any transaction. Further, the behaviour of transactions with respect to the immediate and mandatory flags on Basic.Publish methods is not defined.

Sourcemodule Select_ok : sig ... end

This method confirms to the client that the channel was successfully set to use standard transactions.

Sourcemodule Select : sig ... end

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.

Sourcemodule Commit_ok : sig ... end

This method confirms to the client that the commit succeeded. Note that if a commit fails, the server raises a channel exception.

Sourcemodule Commit : sig ... end

This method commits all message publications and acknowledgments performed in the current transaction. A new transaction starts immediately after a commit.

Sourcemodule Rollback_ok : sig ... end

This method confirms to the client that the rollback succeeded. Note that if an rollback fails, the server raises a channel exception.

Sourcemodule Rollback : sig ... end

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.

OCaml

Innovation. Community. Security.