You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very useful to be able to specify whether the MQTT Client (in my case, I am using the AsyncClient) sets the nodelay flag when establishing the TCP connection to the broker.
Current Behavior
As far as I can tell, (a) there is no option to configure whether the client sets the nodelay flag and (b) the client uses tokio's TcpSocket, which by default does not set the nodelay flag, so that it is not possible for the user to implement a client which does not batch TCP packets when sending them to the broker.
Note
I would be happy to contribute to addressing this issue. I have submitted a PR (#872) with an extension of the NetworkOptions which would enable users to directly configure the nodelay, along with an example how this could be used.
The text was updated successfully, but these errors were encountered:
This extension allows users to specify whether the `nodelay` flag is set for the TCP connection from the MQTT client to the broker. This flag can help reduce latency by disabling Nagle's algorithm, which is beneficial in scenarios requiring minimal delay.
Signed off: FedorSmirnov89
Issue: bytebeamio#871
* feat(mqtt-client): add option to set nodelay flag for TCP connection
This extension allows users to specify whether the `nodelay` flag is set for the TCP connection from the MQTT client to the broker. This flag can help reduce latency by disabling Nagle's algorithm, which is beneficial in scenarios requiring minimal delay.
Signed off: FedorSmirnov89
Issue: #871
* Apply suggestions from code review
Co-authored-by: Devdutt Shenoi <devdutt@outlook.in>
* Removed the nodelay example following review suggestion
---------
Co-authored-by: Devdutt Shenoi <devdutt@outlook.in>
Expected Behavior
It would be very useful to be able to specify whether the MQTT Client (in my case, I am using the
AsyncClient
) sets thenodelay
flag when establishing the TCP connection to the broker.Current Behavior
As far as I can tell, (a) there is no option to configure whether the client sets the
nodelay
flag and (b) the client uses tokio'sTcpSocket
, which by default does not set thenodelay
flag, so that it is not possible for the user to implement a client which does not batch TCP packets when sending them to the broker.Note
I would be happy to contribute to addressing this issue. I have submitted a PR (#872) with an extension of the
NetworkOptions
which would enable users to directly configure thenodelay
, along with an example how this could be used.The text was updated successfully, but these errors were encountered: