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
If a client connects to the STOMP server with this heartbeat header:
heart-beat:30000,300000
The server then might respond with:
heart-beat:300000,30000
This should result in the client sending a heartbeat every 30 seconds (max of c.x, s.y), and the server sending a heartbeat every 5 minutes (max of c.y, s.x).
By default it appears that the Stomp server handler will in this situation send a heartbeat every 30 seconds and expect one from the client every 5 minutes. I think this is because the API is slightly confusing. The following call will compute the heartbeat interval for the STOMP client.
The resulting value is then passed in to the connection.configureHeartbeat function as the first parameter, which is the server heartbeat ping time. Basically, these need to be reversed either by reversing the parameters passed to that configureHeartbeat or change the way the handler is calculating ping/pong.
The text was updated successfully, but these errors were encountered:
deepsleep
added a commit
to deepsleep/vertx-stomp
that referenced
this issue
Jul 7, 2018
If a client connects to the STOMP server with this heartbeat header:
heart-beat:30000,300000
The server then might respond with:
heart-beat:300000,30000
This should result in the client sending a heartbeat every 30 seconds (max of c.x, s.y), and the server sending a heartbeat every 5 minutes (max of c.y, s.x).
By default it appears that the Stomp server handler will in this situation send a heartbeat every 30 seconds and expect one from the client every 5 minutes. I think this is because the API is slightly confusing. The following call will compute the heartbeat interval for the STOMP client.
Frame.Heartbeat.computePingPeriod(
Frame.Heartbeat.parse(frame.getHeader(Frame.HEARTBEAT)),
Frame.Heartbeat.create(connection.server().options().getHeartbeat()));
The resulting value is then passed in to the connection.configureHeartbeat function as the first parameter, which is the server heartbeat ping time. Basically, these need to be reversed either by reversing the parameters passed to that configureHeartbeat or change the way the handler is calculating ping/pong.
The text was updated successfully, but these errors were encountered: