Newer Version Available

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

View and Manage an Event’s Subscribers on the Platform Event’s Detail Page

View the triggers, flows, and processes that are subscribed to a platform event in the Subscriptions related list. Manage subscriptions for Apex triggers.

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, aren't listed in this page.

  1. From Setup, enter Platform Events in the Quick Find box, then select Platform Events.
  2. 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.

    Only one “Process” subscriber appears in the Subscriptions related list for all paused flow interviews that are subscribed to the platform event. Processes and platform event–triggered flows are listed individually.

    Note

  3. 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.

    Why are you seeing flow version details when you click a process? Similar to a flow, a running instance of a process is a flow interview. The information that you see on the Flow Version page is about the process. You can click the flow API name of the process to view the list of processes for your org.

    Note

List of subscribers for the platform event

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.

For high-volume platform events, the Last Published Id value is not available and is always shown as Not Available.

Note

Subscription States

Also, the Subscriptions list shows the state of each subscriber, which can be one of the following.

  • Running—The subscriber is actively listening to events. If you modify the subscriber, the subscription continues to process events.
  • 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.
  • 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.

To manage a trigger subscription:

  1. In the Subscriptions related list, click Manage next to the Apex trigger.
  2. 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.

  • After you modify a subscriber, the subscription resumes automatically. For more information, see the Subscription States section.
  • If you click Resume for a trigger that’s in the error state, the trigger skips the events that were retried with EventBus.RetryableException. The subscription starts with the unprocessed events sent after the error state was reached and that are within the retention window.

Note