Testing an Apex Trigger Configured with Parallel Subscriptions
You can test an Apex platform event trigger that’s configured with parallel
subscriptions the same way that you test a regular Apex platform event trigger.
See Testing Your Platform Event in Apex.
To verify that a trigger is configured for parallel subscriptions, run a query on EventBusSubscriber and select the IsPartitioned field. A value of true means that the trigger uses parallel subscriptions.
This example shows a sample query that gets all Apex trigger subscribers that are subscribed to the Order_Event__e platform event. The IsPartitioned field is one of the fields returned.
1SELECT ExternalId, Name, Position, Status, IsPartitioned FROM EventBusSubscriber
2WHERE Topic='Order_Event__e' AND Type='ApexTrigger'Sample query result:
- ExternalID
- 01qZ70000008PWi
- Name
- MyOrderEventTrigger
- Position
- 179
- Status
- Running
- IsPartitioned
- true
See EventBusSubscriber in the Object Reference for the Salesforce Platform.