You need to sign in to do that
Don't have an account?
Baljeet 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
Thanks
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:
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.