Newer Version Available
Example: Replay Generic Streaming Events Using a Visualforce Page
This code example replays Streaming API events. It contains an interactive Visualforce page that allows you to generate test events and view them. You can also specify how many events are retrieved and displayed on the page by setting replay options.
The logic for replaying events is contained within a Visualforce component, which is included in the Visualforce page. The component registers the Salesforce-provided CometD extension and sets replay options.