/// <inheritdoc />
 public void NAck()
 {
     if (_messageQueueTransaction?.Status == MessageQueueTransactionStatus.Pending)
     {
         _messageQueueTransaction.Abort();
     }
 }
Beispiel #2
0
        public void Send(IMessage msg, MessageQueueTransactionType transactionType)
        {
            switch (transactionType)
            {
            case MessageQueueTransactionType.Single:
                using (IMessageQueueTransaction tx = provider.CreateMessageQueueTransaction())
                {
                    try
                    {
                        Send(msg, tx);
                        tx.Commit();
                    }
                    catch (Exception e)
                    {
                        tx.Abort();
                        throw new MonoMessagingException(e.Message, e);
                    }
                }
                break;

            case MessageQueueTransactionType.None:
                Send(msg);
                break;

            case MessageQueueTransactionType.Automatic:
                throw new NotSupportedException("Automatic transaction types not supported");
            }
        }
Beispiel #3
0
 public void Abort()
 {
     delegateTx.Abort();
 }