Newer Version Available
Replay PushTopic Streaming Events (Beta)
The subscriber can choose which events to receive, such as all events within the retention window or starting after a particular event. The default is to receive only the new events sent after subscribing. Streaming API uses an event framework that decouples event producers from event consumers. Therefore, a subscriber can retrieve events at any time and isn’t restricted to listen to events at the time they’re sent. Events outside the 24-hour retention period are discarded.
The way PushTopic events are replayed is identical to how Generic Streaming events are replayed, except for the subscription channel. The channel for PushTopic events includes the name of the PushTopic. For example:
1"channel":"/topic/MyTopicName"You can subscribe to a PushTopic channel by passing replay options to a CometD extension at the following replay endpoint.
1https://Salesforce_Instance/cometd/replay/36.0/To learn how to pass options to the replay CometD extension, see the code examples in Replay Events Sample: Code Walkthrough. Also, check out these code samples on GitHub.