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

API provides no means to see retain flag on received messages #15

Open
beanz opened this issue Oct 23, 2021 · 0 comments
Open

API provides no means to see retain flag on received messages #15

beanz opened this issue Oct 23, 2021 · 0 comments

Comments

@beanz
Copy link

beanz commented Oct 23, 2021

After a client subscribes, sometimes the first message it receives on a topic is a retained message. Such messages might be old and the client may not wish to act upon such a message so it is useful to be able to distinguish this case. The protocol is such that messages published by the server to the client only have the retain flag set if the message is such a message (that is even if the client that published it set the retain flag the server resets it when it is published if it is sent straightaway.) There is currently no way to distinguish these messages as the handler interface doesn't seem to expose the retain flag.

Not sure if there is a good way to add this while retaining backward compatibility sadly.

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

1 participant