How can a Bayeux Client stop receiving messages from Bayeux Server? Is there a way to block the channel between client and server at the client side?

249 views Asked by At

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 answers

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.