To get information about the triggers that are subscribed to change events, query the EventBusSubscriber standard object using SOQL. EventBusSubscriber contains information about Apex triggers but not CometD or Pub/Sub API subscribers.
Example
This example SOQL query selects several fields from EventBusSubscriber. For more information about EventBusSubscriber fields, see EventBusSubscriber in the Object Reference for Salesforce and Lightning Platform.
1SELECT ExternalId, Name, Topic, Position, Status, Tip, Type FROM EventBusSubscriber
The returned result shows that there are two Apex triggers subscribed to change events. One trigger is subscribed to AccountChangeEvent and one to ContactChangeEvent.
ExternalId
Name
Topic
Position
Status
Tip
Type
01q2J000000g0kb
MyAccountChangeTrigger
AccountChangeEvent
226751
Running
-1
ApexTrigger
01q2J000000g0kg
MyContactChangeTrigger
ContactChangeEvent
226752
Running
-1
ApexTrigger
You can filter the query results by using a WHERE clause. For example, this query filters by the topic ContactChangeEvent.
1SELECT ExternalId, Name, Topic, Position, Status, Tip, Type FROM EventBusSubscriber 2WHERE Topic='ContactChangeEvent'
The query returns only the trigger subscribers to ContactChangeEvent, in this case, one trigger.