Newer Version Available

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

Example: Replay PushTopic and Generic Streaming Events Using a Visualforce Page

This sample app shows you how to subscribe to durable streaming events for PushTopic and generic events. The app contains two interactive Visualforce pages: one for PushTopic events and one for generic events. You can generate test events and view them on each page. You specify which events are retrieved and displayed by setting replay options.

For each Visualforce page, the logic for replaying events is contained within a Visualforce component. The component registers the Salesforce-provided CometD extension and sets replay options.