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

How to intercept messages published from Server in V4 #1470

Closed
Jeanot-Zubler opened this issue Jul 26, 2022 · 1 comment
Closed

How to intercept messages published from Server in V4 #1470

Jeanot-Zubler opened this issue Jul 26, 2022 · 1 comment
Labels
question It is a question regarding the project

Comments

@Jeanot-Zubler
Copy link

Describe your question

In V3 my ApplicationMessageInterceptor checked, whether the ClientId was null and if that was the case, set context.ApplicationMessage.Retain = true;. This way, all messages published by the server would be retained.

In V4 I publish messages from the broker by calling the server.InjectApplicationMessage() method. I also added an eventhandler to the server.InterceptingPublishAsync property, that tries to do the same thing as my ApplicationMessageInterceptor did before. However, for server side injected messages, this handler is never called. Do I need to use a different Event for this, or is this not possible? Do I have to set Retain = true on every message I want to publish from the server at the location it is generated?

Which project is your question related to?

  • Server
@Jeanot-Zubler Jeanot-Zubler added the question It is a question regarding the project label Jul 26, 2022
@chkr1011
Copy link
Collaborator

Thanks for reporting this issue. This is indeed an issue. This will be fixed in the next version 4.1 of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question It is a question regarding the project
Projects
None yet
Development

No branches or pull requests

2 participants