Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Testing an Apex Trigger Configured with Parallel Subscriptions
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.