At the server, CometD provides a MaxQueueListener hook to drop messages but if the Bayeux Client wants to stop receiving messages from a server without disconnecting , can it achieve that?

1

There are 1 best solutions below

2
sbordet On

A BayeuxClient receives message from the server only for the channels it is subscribed to.

For a BayeuxClient to stop receiving messages from the server is enough to unsubscribe from all channels it subscribed to.

The BayeuxClient will still receive meta messages on meta channels that are part of the Bayeux protocol, but no application message will be delivered by the server.