rabbitmq / rabbitmq-web-stomp

Provides support for STOMP over WebSockets
Other
89 stars 26 forks source link

Heartbeat on SockJS #71

Closed gretro closed 6 years ago

gretro commented 7 years ago

Hello.

I started using this plugin as part as a mock-up for what I need to do using messaging. It works pretty well, but one thing bothers me: the heartbeat using SockJS. It's clearly documented that the server heartbeat is deactivated on SockJS, which I'm ok with. However, during the connection procedure, the server still returns a valid heartbeat configuration instead of telling the client heartbeat is not supported.

Here is what the client sends:

>>> CONNECT
login:<login>
passcode:<password>
accept-version:1.1,1.0
heart-beat:10000,10000

Here is what the server sends back:

<<< CONNECTED
server:RabbitMQ/3.6.6
session:<session>
heart-beat:10000,10000
version:1.1

The problem here is that the server should return this instead:

<<< CONNECTED
server:RabbitMQ/3.6.6
session:<session>
heart-beat:0,0
version:1.1

This way, there can be no confusion, no mistake on the part of the client implementation.

gretro commented 7 years ago

By the way, I'm not blocked. I disabled the heartbeat on the client-side in the mean time. Just wanted to report this behavior.

essen commented 7 years ago

This has been fixed once in https://github.com/rabbitmq/rabbitmq-web-stomp/pull/29

I'm guessing some other change broke it. Perhaps https://github.com/rabbitmq/rabbitmq-web-stomp/pull/49 ?

michaelklishin commented 6 years ago

SockJS support has been removed in 3.7.0 and is not coming back => this is no longer relevant. Please switch to the regular WebSocket endpoint.