Streaming, Platform Events and CDC

This page is not fully complete

Overview

Terms

CometD client

  • If the client receives events, the client must reconnect immediately using CometD to receive the next set of events. If the reconnection doesn't occur within 40 seconds, the server expires the subscription, and the connection closes.

  • The maximum size of the HTTP request post body that the server can accept from the client is 32,768 bytes.

Streaming API

  • Push technology - Pub / Sub model

  • Near real-time stream of data, but asynchronous

  • Can be used internally also

  • Active connection must be maintained via long polling

  • Steps

    • Push Topics are created

    • Client negotiates a connection

      • Login request and response

    • Handshake request

    • Connection request

    • Subscribe to a channel

    • Client waits for an event

    • No need for polling

    • Salesforce Broadcast changes

    • Client asks Salesforce to keep the connection open

  • Concurrent limits (No. of long running calls) and total limits.

  • Streaming API regularly validates the OAuth token or session ID while the client is connected.

  • Durability is not guaranteed

Change Data Capture