Havret / dotnet-activemq-artemis-client

.NET Client for Apache ActiveMQ Artemis
https://havret.github.io/dotnet-activemq-artemis-client/
MIT License
64 stars 11 forks source link

Exception thrown on transaction dispose #443

Closed Havret closed 1 year ago

Havret commented 1 year ago

Describe the bug

On attempt to dispose a transaction the following exception has been thrown by the client.

ActiveMQ.Artemis.Client.Exceptions.TransactionException: An attempt was made to transition a task to a final state when it had already completed.
   at ActiveMQ.Artemis.Client.Transactions.TransactionCoordinator.DischargeAsync(Byte[] txnId, Boolean fail, CancellationToken cancellationToken)
   at ActiveMQ.Artemis.Client.Transactions.Transaction.RollbackAsync(CancellationToken cancellationToken)
   at ActiveMQ.Artemis.Client.Transactions.Transaction.DisposeAsync()

Expected behavior

Exception should not be thrown.

Environment: