-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Send message on to client after connection #1435
Comments
Additional information: injecting the message in a different task that delays even as little as 1ms is enough for the client to receive the message. It seems that when |
I fixed this issue. Please test with version 4.0.2.192 from the MyGet feed (see readme) and let me know if it works. No delay etc. is required. The event was just fired at the wrong time (as you already mentioned). |
The readme does not contain any reference to a MyGet feed. |
It does :) --> https://www.myget.org/feed/mqttnet/package/nuget/MQTTnet |
My fault. I used |
And I confirm it works. Great, thanks. |
I feel that it is not as convenient to use as before, and the new one does not know what to use. |
Describe the feature request
I am trying to publish a message just after a client connects and subscribes to a specific topic. The message is intended to send initial configuration to the client, so it is important that the client receives it. I tryied injecting a message using
InjectApplicationMessage
from theClientSubscribedTopicAsync
event but the client does not receive the message.Which project is your feature request related to?
Describe the solution you'd like
It would be nice if
ClientSubscribedTopicAsync
could be called after setting up the client subscription and make sure that messages generated on the server are correctly delivered.Note: I am using version 4.0.0 of MQTTnet; in version 3 this worked.
The text was updated successfully, but these errors were encountered: