Given a Java web application using CometD, how can I publish a message to all of a channel's subscribers each time a message is processed by bayeux?
For testing, I used serverSession.deliver(serverSession, "/test-channel", map, null);
.
The result is that my Javascript client will subscribe successfully, but only receive messages 1 out of 10 tries. So, 90% of the time, no messages are ever received by the browser, yet the Bayeux logging (level 3) shows that they are being sent to the correct channel every time.
Should I be using some form of a client session? The CometD documentation appears to be a bit unclear.