Event Monitor Page
Overview
The Event Monitor page allows users to subscribe to and display Salesforce Platform Events in real-time. It supports both Standard and Custom Platform Events. The page uses the CometD library to connect to Salesforce and stream events directly to the user's browser.
Key Features
- Subscribe to Platform Events: Users can select a channel (Standard or Custom Platform Events) and subscribe to it to receive live updates.
- View Events: Events are displayed in a structured format, allowing users to monitor event data as it arrives.
- Replay Events: Users can specify a
Replay From
value to replay past events from a specific point in time. - Copy Event Data: Users can copy the event data in JSON format for further analysis or troubleshooting.
Subscribe to an Event from the Popup
You can also directly access to the Event Monitor page and pre-select the Event from the popup by click the Subscribe to Event
button.
Replay From Parameter Warning
The Replay From
parameter is a powerful feature that allows users to replay past events by specifying an event replay ID. However, it must be used with great caution in production environments.
Warning
- Setting the
Replay From
parameter to-2
(to replay all events) can quickly consume your daily limit of platform events. - Exceeding this limit can disrupt existing integrations and cause significant issues in a production environment.
- Always consider the implications of replaying a large number of events, especially in a production setting.
Usage Instructions
- Select Channel Type: Choose between Standard or Custom Platform Events.
- Select Channel: Pick the specific event channel you want to monitor.
- Set Replay From (Optional): Define the starting point for replaying events. Use the default value
-1
to receive only new events. - Subscribe: Click the "Subscribe" button to start monitoring the selected channel.
- Unsubscribe: Click the "Unsubscribe" button to stop monitoring.
Production Considerations
If you are monitoring events in a production environment, the interface will highlight the potential risks, especially when using the replay functionality. Be cautious and ensure you fully understand the impact of subscribing to large volumes of events.
Note: Always test the functionality in a sandbox environment before deploying it to production to avoid unintended consequences.