public void Handler(object sender, BasicNackEventArgs e, IPublishedMessageStore publishedMessageStore) { using (var tx = publishedMessageStore.BeginTransaction()) { RmqPublishMessage targetMessage = publishedMessageStore.GetByDeliveryTag(e.DeliveryTag); targetMessage.Status = MessageStatusConstants.Failed; publishedMessageStore.Commit(tx); } }
public ActionResult <string> Read() { RmqPublishMessage found = _publishedMessageStore.GetByDeliveryTag(1); return(JsonConvert.SerializeObject(found, Formatting.Indented)); }