Inheritance: System.Exception
Esempio n. 1
0
        public void HandleMqCustomException(IMessageHandler mqHandler, IMessage <MqCustomException> message, Exception ex)
        {
            LastCustomException = ex.InnerException as CustomException;

            bool requeue = !(ex is UnRetryableMessagingException) &&
                           message.RetryAttempts < 1;

            if (requeue)
            {
                message.RetryAttempts++;
            }

            message.Error = ex.ToResponseStatus();
            mqHandler.MqClient.Nak(message, requeue: requeue, exception: ex);
        }
Esempio n. 2
0
        public void HandleMqCustomException(IMessageHandler mqHandler, IMessage<MqCustomException> message, Exception ex)
        {
            LastCustomException = ex.InnerException as CustomException;

            bool requeue = !(ex is UnRetryableMessagingException)
                && message.RetryAttempts < 1;

            if (requeue)
            {
                message.RetryAttempts++;
            }

            message.Error = ex.ToResponseStatus();
            mqHandler.MqClient.Nak(message, requeue: requeue, exception: ex);
        }