// Shut down server before sending this message, after 30 seconds, the message will be moved to Transactional dead-letter messages queue. static void Expiration(IBus bus) { MessageThatExpires messageThatExpires = new MessageThatExpires { RequestId = new Guid() }; bus.Send("Samples.Unobtrusive.Server", messageThatExpires); Console.WriteLine("message with expiration was sent"); }
// Shut down server before sending this message, after 30 seconds, the message will be moved to Transactional dead-letter messages queue. static async Task Expiration(IEndpointInstance endpointInstance) { var messageThatExpires = new MessageThatExpires { RequestId = new Guid() }; await endpointInstance.Send(messageThatExpires) .ConfigureAwait(false); Console.WriteLine("message with expiration was sent"); }