in src/NMS.AMQP/Provider/Amqp/AmqpTransactionContext.cs [55:78]
public async Task Rollback(NmsTransactionInfo transactionInfo, NmsTransactionInfo nextTransactionInfo)
{
if (!Equals(transactionInfo.Id, this.current))
{
if (!transactionInfo.IsInDoubt && this.current == null)
throw new IllegalStateException("Rollback called with no active Transaction.");
if (!transactionInfo.IsInDoubt && this.current != null)
throw new IllegalStateException("Attempt to rollback a transaction other than the current one");
return;
}
Tracer.Debug($"TX Context{this} rolling back current TX[{this.current}]");
this.current = null;
await this.coordinator.DischargeAsync(this.txnId, true).Await();
PostRollback();
if (nextTransactionInfo != null)
{
await Begin(nextTransactionInfo).Await();
}
}