-
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
Timing of ConnectAsync #2066
Comments
I digged a bit deeper into the log and found the following: After ClientA received all available messages on this topic, I disconnected it and created a second instance of MqttNet's client (ClientB) and subscribed it to another topic. The log entry here looks quite similar despite the small difference that the first message is acknowledged after 10ms instead of 200ms. **Important: ** This all happened within one process. This means I can instantiate as many clients after each other as I want to, all of them (except the first one) take 10ms instead of 200ms to acknowledge their first received message. Here the raw logs:
Client B:
Any idea where this delay comes from and how to mitigate it? Many thanks |
Hi everyone
I realized the client takes ~200ms to connect to my remote broker, which seems very slow to me.
If I disconnect the client, instantiate, and connect a new one, connecting takes only 14ms instead of 200ms.
I can reproduce this behavior and am wondering if this is related to the client or any other network-related issue? Has anyone observed similar behavior?
Approach:
To evaluate timing, I create a new StreamWriter for each client and write to a file on each LogMessagePublished
Output Logfile
Details:
Many thanks and looking forward to your hints/ideas
Filip
The text was updated successfully, but these errors were encountered: