discourse / message_bus

A reliable and robust messaging bus for Ruby and Rack
MIT License
1.65k stars 134 forks source link

Initial messages not delivered #236

Open teejteej opened 4 years ago

teejteej commented 4 years ago

Hi,

When I enqueue some messages via the Rails console, then load the page, the messages are never delivered. Similarly when I load the load the page, then enqueue some messages in the first few seconds, these are not delivered too.

Only a few seconds after the page is loaded, then enqueue some messages, they get delivered from that moment on.

Any ideas where I can start looking? Using Nginx (proxy_buffering off) and Puma.

lucasfeijo commented 3 years ago

@teejteej Did you end up fixing this issue? I experience the same slowness to subscribe.

teejteej commented 3 years ago

@lucasfeijo Never got to dig more into the issue, so I haven't resolved it yet.

rafbgarcia commented 3 years ago

@teejteej did you try tweaking the callbackInterval property? In our case, users subscribe to channels as they switch conversations, which triggers the long polling to abort and restart after a minimum interval defined by that property (15 seconds by default).

I'm not sure if that's your case, though, but you can decrease it to, say, 100ms, and see if helps.