commitReceivedMessage

Records that the application has durably applied message and acknowledges it to its sender (docs/application-delivery.md).


Records that the application has durably applied message id from sender and acknowledges it (docs/application-delivery.md).

In one transaction the pending message is removed and its logical ID recorded as committed, with the commit time and a digest of its body (CommitStatus.COMMITTED). Only after that commit, outside it, the encrypted acknowledgement is sent on the existing session. A failed acknowledgement never undoes the commit: CommitResult.ackSent is false, and the sender's next retry is acknowledged.

Idempotent: for a message committed before, nothing changes and the acknowledgement is sent again (CommitStatus.ALREADY_COMMITTED). A discarded message stays discarded (CommitStatus.ALREADY_DISCARDED, acknowledged again). A message that is neither pending nor finalized (never received, or its entry was pruned) throws SecureMessageClientException.ReceivedMessageNotPending.

Call it only after the application's own transaction committed. If the application crashes in between, the message is delivered again; apply it idempotently, keyed by (sender, id).