Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Host] Publishing to a request/response queue (no replyto header) #271

Closed
EtherZa opened this issue Jun 25, 2024 · 2 comments
Closed

[Host] Publishing to a request/response queue (no replyto header) #271

EtherZa opened this issue Jun 25, 2024 · 2 comments

Comments

@EtherZa
Copy link
Contributor

EtherZa commented Jun 25, 2024

Publishing an event to a request/response queue results in an exception being thrown because no ReplyTo header has been set.

MessageBusBase.cs

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).

@zarusz
Copy link
Owner

zarusz commented Jun 25, 2024

Makes sense to change!

EtherZa added a commit to EtherZa/SlimMessageBus that referenced this issue Jun 25, 2024
…ue. Drop response as there is no listener.
EtherZa added a commit to EtherZa/SlimMessageBus that referenced this issue Jun 25, 2024
…eue. Drop response as there is no listener.

Signed-off-by: Richard Pringle <richardpringle@gmail.com>
EtherZa added a commit to EtherZa/SlimMessageBus that referenced this issue Jun 25, 2024
…eue. Drop response as there is no listener.

Signed-off-by: Richard Pringle <richardpringle@gmail.com>
zarusz pushed a commit that referenced this issue Jun 25, 2024
…rop response as there is no listener.

Signed-off-by: Richard Pringle <richardpringle@gmail.com>
@zarusz
Copy link
Owner

zarusz commented Jun 25, 2024

Closed by #272

@zarusz zarusz closed this as completed Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants