Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.2
-
None
-
Google Chrome 19.0.1084.30 (Official Build 132762) beta
OS Linux
WebKit 536.5 (@114489)
JavaScript V8 3.9.24.14
Description
An user reported a bug on stomp-websocket which was expecting only 1 STOMP frame for each Web Socket messages.
I fixed it to ensure that the JavaScript library can acccept many STOMP frames in a single Web Socket message: https://github.com/jmesnil/stomp-websocket/blob/multiple_stomp_frames/dist/stomp.js
However, even with that fix, I am not able to consume many messages sent to the Web browser.
Steps to reproduce:
- use Apollo websocket example
- replace its js/stomp.js by the one with the fix: https://github.com/jmesnil/stomp-websocket/blob/multiple_stomp_frames/dist/stomp.js
- run the attached python script (which uses stomp.py library)
$ python publisher.py
=> OK the chat will consume the 300 produced messages + a SHUTDOWN message - update the publisher.py and change messages to 100000
- run again the attached python script
=> FAIL the chat will consume only 344 or so messages (all from a single Web Sockets message)
=> the publisher.py blocks after sending 8,874 messages and does not send all the expected messages
fiy, the Apollo web sockets example used default ack for the subscriber ('auto')
I am not sure whether the bug is in my JavaScript library or in Apollo but the publisher being stuck looks fishy.
Afaict, the Web browser receives only a single Web Socket message from the broker. I added debug traces at the very top when I receive a WebSockets frames and I see only 1 containing STOMP MESSAGE frames.
The REST management API gives me these info
- WebSocket consumer:
Protocol Info
protocol: stomp
protocol version: 1.0
protocol session id: mybroker-6e
user: admin
subscription count: 1
waiting on: client request
Metrics
messages received from the client: 0
messages sent to the client: 344
- Python producer
Protocol Info
protocol: stomp
protocol version: 1.0
protocol session id: mybroker-6f
user: admin
subscription count: 0
waiting on: blocked sending to: stomp subscription id: sub-0, remote address: /127.0.0.1:36973 (via topic:chat.general)
Metrics
messages received from the client: 8,874
messages sent to the client: 0
Attachments
Attachments
Issue Links
- is related to
-
APLO-172 Broker does not respond to any publisher/subscriber after disconnecting and connecting one client/browser
- Resolved