function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Baljeet LalotraBaljeet Lalotra 

CometD (Platform Event)

Is there a way in which we can control a Platform Event messages flow from the cometD Server to cometD Client by requesting from the cometD Client i.e can a cometD client can ask the cometD server  for stopping the sending of further messages till the messages lying with cometD client are processed.

Thanks
Baljeet
ShivankurShivankur (Salesforce Developers) 
Hi Baljeet,

The client receives events from the server while it maintains a long-lived connection. CometD performs the handshake, connection, and reconnection requests. 

This is how the flow looks like:
cometDflow
Since, Streaming API uses the Bayeux protocol and CometD for long polling.Long polling, also called Comet programming, allows emulation of an information push from a server to a client. Similar to a normal poll, the client connects and requests information from the server. However, instead of sending an empty response if information isn't available, the server holds the request and waits until information is available (an event occurs). The server then sends a complete response to the client. The client then immediately re-requests information. The client continually maintains a connection to the server, so it’s always waiting to receive a response. In the case of server timeouts, the client connects again and starts over.

See how the Client Connects : 
https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/using_streaming_api_client_connection.htm

Hope above information helps, Please mark as Best Answer so that it can help others in the future.

Thanks.
Alexia SparrowAlexia Sparrow
I don't know the way to control a Platform Event but I was searching for the software localization service and I found the https://isaccurate.com/software-localization-services link and this link helped me a lot. I got this link from Google so you also search about it on Google.