public void Execute(Envelope envelope, IEnvelopeContext context)
        {
            try
            {
                context.SendOutgoingMessages(envelope, _context.OutgoingMessages());

                envelope.Callback.MarkSuccessful();

                var message = new MessageSuccessful { Envelope = envelope.ToToken() };
                if (!message.Envelope.IsDelayedEnvelopePollingJobRelated())
                    context.InfoMessage(message);
            }
            catch (Exception ex)
            {
                context.SendFailureAcknowledgement(envelope, "Sending cascading message failed: " + ex.Message);
                context.Error(envelope.CorrelationId, ex.Message, ex);
                envelope.Callback.MoveToErrors(new ErrorReport(envelope, ex));
            }
        }
Exemplo n.º 2
0
 protected bool Equals(MessageSuccessful other)
 {
     return Equals(Envelope, other.Envelope);
 }
Exemplo n.º 3
0
 protected bool Equals(MessageSuccessful other)
 {
     return(Equals(Envelope, other.Envelope));
 }