Newer Version Available
View and Manage an Event’s Subscribers on the Platform Event’s Detail Page
View Event Subscribers
View a list of all triggers, processes, and platform event–triggered flows that are subscribed to a platform event in the Subscriptions related list. CometD subscribers, such as your own CometD client or the empApi Lightning component, and Pub/Sub API subscribers aren't listed in this page.
- From Setup, enter Platform Events in the Quick Find box, then select Platform Events.
- Click your event’s name.
On the event’s definition page, the Subscriptions related list shows all the active triggers, processes, and platform event–triggered flows that are subscribed to the platform event.
- To access a subscriber’s definition, click the subscriber name in the Subscriptions related list. For a trigger, details include its implementation and API version. For a process, details include its version number and API name.
The list shows the replay ID of the event that the system last processed (Last Processed Id field) and the event last published (Last Published Id field). Knowing which replay ID was last processed is useful when there’s a gap in the events published and processed. For example, if a trigger contains complex logic that causes a delay in processing large batches of incoming events.
Subscription States
Also, the Subscriptions list shows the state of each subscriber, which can be one of these values.
- Error— The subscriber was disconnected and stopped receiving published events. A trigger reaches this state when it exceeds the number of maximum retries with the EventBus.RetryableException. Trigger assertion failures and unhandled exceptions don’t cause the error state. We recommend limiting the retries to fewer than nine times to avoid reaching this state. When you fix and save the trigger, or for a managed package trigger, if you redeploy the package, the trigger resumes automatically from the tip, starting from new events. Also, you can resume a trigger subscription in the subscription detail page that you access from the platform event page.
- Repartitioning—The system is in the process of modifying the trigger's parallel subscription configuration.
- Running—The subscriber is actively listening to events. If you modify the subscriber, the subscription continues to process events.
- Suspended—The subscriber is disconnected and can’t receive events because a Salesforce admin suspended it or due to an internal error. You can resume a trigger subscription in the subscription detail page that you access from the platform event page. To resume a process, deactivate it and then reactivate it. If you modify the subscriber, the subscription resumes automatically from the tip, starting from new events.
Suspend or Resume an Apex Trigger Subscription
Resume a suspended trigger subscription where it left off, starting from the earliest event message that is available in the event bus. If you want to bypass event messages that are causing errors or are no longer needed, you can resume the subscription from the tip, starting from new event messages.
| User Permissions Needed | |
|---|---|
| To manage a trigger subscription: | Customize Application AND Author Apex |
To manage a trigger subscription:
- In the Subscriptions related list, click Manage next to the Apex trigger.
- In the subscription detail page, choose the appropriate action.
- To suspend a running subscription, click Suspend.
- To resume a suspended subscription, starting from the earliest event message that is available in the event bus, click Resume.
- To resume a suspended subscription, starting from new event messages, click Resume from Tip.
You can’t manage subscriptions for flows and processes through the Subscriptions related list.