Newer Version Available

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

EventBusSubscriber

Represents a trigger that is subscribed to a platform event.

Supported Calls

query()

Special Access Rules

EventBusSubscriber is read only and can only be queried.

Fields

Field Details
ExternalId
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The ID of the subscriber. For example, the trigger ID.
Name
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The name of the subscribed item, such as the trigger name.
Position
Type
int
Properties
Filter, Group, Nillable, Sort
Description
The replay ID of the last event that the subscriber processed.
Status
Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Indicates the status of the subscriber. Can be one of the following values:
  • Running—The subscriber is actively listening to events.
  • Suspended—The subscriber is disconnected and can’t receive events due to lack of permissions.
  • Expired—The subscriber’s connection expired. In rare cases, subscriptions can expire if they’re inactive for an extended period of time.
  • Error—The subscription encountered an error and has been disconnected.
Tip
Type
int
Properties
Filter, Group, Nillable, Sort
Description
The replay ID of the last published event.
Topic
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The name of the subscription channel that corresponds to a platform event. The topic name is the event name appended with __e, such as MyEvent__e. The topic is the channel that the subscriber is subscribed to.
Type
Type
string
Properties
Filter, Group, Nillable, Sort
Description
The subscriber type. Can be one of the following values:
  • ApexTrigger
  • Process—Reserved for future use.

Usage

Use EventBusSubscriber to query details about subscribers to a platform event. You can get all subscribers for a particular event by filtering on the Topic field, as follows.

1SELECT ExternalId, Name, Position, Status, Tip, Type
2FROM EventBusSubscriber
3WHERE Topic='Low_Ink__e'