General Considerations
Keep these considerations in mind when using Pub/Sub API.
Pub/Sub API uses, for processing purposes, infrastructure that’s provided by Amazon Web Services, Inc. and located in the regions listed below. By using the Pub/Sub API, you agree to the use of AWS infrastructure for processing purposes and acknowledge that such processing can occur outside the region where your production org is located. Event processing can cause data in transit to pass through and exist temporarily in an external region. If you use the Pub/Sub API endpoint specific to the region where your org is located, event processing occurs in the same region as your org. For more information, see Pub/Sub API Endpoints and Regions, Availability Zones, and Local Zones in the AWS documentation.
Regions:
- Asia Pacific (Mumbai, Sydney, Tokyo)
- Canada (Central)
- Europe (Frankfurt, London)
- South America (São Paulo)
- US East (N. Virginia)
- US West (Oregon)
Events in the Salesforce event bus aren't persisted or stored outside the region where your org is located.
If channel membership or user permissions change after a subscription starts and while it’s active, the changes take effect within 10 minutes. The same delay applies to publishing platform events. Here are some examples.
- If a new member is added to a channel, the client receives events corresponding to the new member within 10 minutes.
- If a user loses their View All permission on a Salesforce object included in a channel member, they stop receiving the object’s change events within 10 minutes.
- If a channel is deleted, the subscription ends with an error within 10 minutes. A channel can be a change data capture channel or a custom platform event channel.
- If a user loses their create permission for a platform event, they can’t publish the event anymore after 10 minutes or less.
For more information about change data capture channels and permissions, see Subscription Channels and Required Permissions for Change Events in the Change Data Capture Developer Guide. For more information about custom platform event channels, see Group Platform Events into One Stream with a Custom Channel in the Platform Events Developer Guide.
If you start multiple subscriptions for the same Salesforce org and topic, each subscription stream is independent of the others. The same events are delivered to each subscriber client. Add some logic in your client to handle duplicate events. The system-generated id
field value in the received events uniquely identifies each event. You can dedupe events using the id
field. If a Pub/Sub API publisher overrides the id
field value, it's possible that the id
isn't unique. See Identify an Event with ProducerEvent.id and PublishResponse.correlationKey. The id
field corresponds to the EventUuid
field in events delivered to non-Pub/Sub API clients. See Identify and Match Event Messages with the EventUuid Field in the Platform Events Developer Guide.
The Lock sessions to the IP address from which they originated
setting in the Session Settings page in Setup must be disabled for Pub/Sub API. If you enable this setting, Pub/Sub API RPC calls fail. For more information, see Modify Session Security Settings in Salesforce Help.