if (!requestHeaders.TryGetHeader(ReqRespMessageHeaders.ReplyTo, out object replyTo))
{
throw new MessageBusException($"The header {ReqRespMessageHeaders.ReplyTo} was missing on the message");
}
It could be useful to instead perform a no-op when the header is missing to allow for a single handler to be used by both IRequestResponseBus.Send and IPublishBus.Publish (where the response can be ignored).
Publishing an event to a request/response queue results in an exception being thrown because no
ReplyTo
header has been set.MessageBusBase.cs
It could be useful to instead perform a no-op when the header is missing to allow for a single handler to be used by both
IRequestResponseBus.Send
andIPublishBus.Publish
(where the response can be ignored).