Exemplo n.º 1
0
        public void OnMessageReceived(EventHandler <T> callback, IMessagingEvent messagingEvent)
        {
            RetryMessage <T> retryMessage = JsonConvert.DeserializeObject <RetryMessage <T> >(messagingEvent.Message.GetBody());

            retryMessage.OriginalMessage.DeliveryTag = EncodeDeliveryTag(messagingEvent.DeliveryTag);
            RetryInformations.Add(retryMessage.OriginalMessage.DeliveryTag, retryMessage.RetryInformations);

            callback(this, retryMessage.OriginalMessage);
        }
Exemplo n.º 2
0
 public void AcknowlegdeDeliveredMessage(IMessagingEvent args)
 {
     this.Channel.BasicAck(ulong.Parse(args.DeliveryTag), false);
 }
Exemplo n.º 3
0
 public void RejectDeliveredMessage(IMessagingEvent args)
 {
     this.Channel.BasicNack(ulong.Parse(args.DeliveryTag), false, true);
 }