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
The first message is always lost. I've fixed this by queuing up the messages to the same URL and sending them together on the same connection. A much better design, I admit.
At the same time, this should work. Why do back-to-back messages on separate connections to the same URL fail? It took me quite a while to find this. There are no error messages. The first messages is simply ignored.
The text was updated successfully, but these errors were encountered:
I've fixed this by queuing up the messages to the same URL and sending them together on the same connection. A much better design, I admit.
Sounds good, this is definitely the better design to use here.
Why do back-to-back messages on separate connections to the same URL fail?
Hard to say to be honest. Is there no output (client or server side) at all for the "discarded" message? This might also depend on how much time each connection needs, maybe the second one is faster or is it possible to achieve different results (only one of them being "discarded" , depending on which connection comes first)? Any additional input is welcome in order to get some more information on this.
FYI: The Ratchet namespace for \ratchet\client\connect(…) should always be camelcase: \Ratchet\Client\connect(…)
Using ratchet/pawl v0.4.1 and PHP 7.4
Implemented pub/sub client in PHP...
This works great. However, if I send back-to-back messages, e.g.
The first message is always lost. I've fixed this by queuing up the messages to the same URL and sending them together on the same connection. A much better design, I admit.
At the same time, this should work. Why do back-to-back messages on separate connections to the same URL fail? It took me quite a while to find this. There are no error messages. The first messages is simply ignored.
The text was updated successfully, but these errors were encountered: