Newer Version Available

This content describes an older version of this product. View Latest

Introducing Generic Streaming

Generic streaming uses Streaming API to send notifications of general events that are not tied to Salesforce data changes.
Use generic streaming when you want to send and receive notifications based on custom events that you specify. You can use generic streaming for any situation where you need to send custom notifications, such as:
  • Broadcasting notifications to specific teams or to your entire organization
  • Sending notifications for events that are external to Salesforce
To use generic streaming, you need:
  • A StreamingChannel that defines the channel, with a name that is case-sensitive
  • One or more clients subscribed to the channel
  • The Streaming Channel Push REST API resource that lets you monitor and invoke push events on the channel

Replay Generic Streaming Events with Durable Generic Streaming

A client can receive generic streaming events after it subscribes to a channel and as long as the Salesforce session is active. Events sent before a client subscribes to a channel or after a subscribed client disconnects from the Salesforce session are missed. However, a client can fetch the missed events within the 24-hour retention window by using Durable Generic Streaming.

For more information about durable events, see Message Durability.

Code Sample

For a code sample on how to replay generic streaming events, see Example: Replay PushTopic and Generic Streaming Events Using a Visualforce Page.