Default Platform Event Allocations for Event Publishing and Delivery

If your org has no add-on licenses, default allocations apply for event publishing and delivery that can’t be exceeded. The default allocations are enforced to ensure fair sharing of resources in the multitenant environment and to protect the service.

  • The event publishing allocation is how many event messages you can send to the event bus per hour by using any method, including Apex, Pub/Sub API and other APIs, flows, and processes.
  • The event delivery allocation is how many event messages can be delivered in a 24-hour period to Pub/Sub API and CometD subscribers, empApi Lightning components, and event relays. It excludes non-API subscribers, such as Apex triggers, flows, and Process Builder processes. Published event messages that are delivered to non-API subscribers, such as Apex triggers, flows, and Process Builder processes, don’t count against the delivery allocation.
  • The event delivery allocation is shared between high-volume platform events and Change Data Capture events.

Event Delivery Usage Combined for All Subscribers 

The number of delivered events to clients is counted for each subscribed client, including event relays. If you have multiple client subscribers, your usage is added across all subscribers. For example, you have an Unlimited Edition org with a default allocation of 50,000 events in a 24-hour period. Within a few hours, 20,000 event messages are delivered to two subscribed clients. So you consumed 40,000 events and are still entitled to 10,000 events within the 24-hour period.

How Is Event Publishing and Delivery Usage Calculated? 

The event hourly publishing and daily delivery limits are rolling limits. The hourly publishing usage is calculated for the number of publishes in the last hour. Similarly, the daily delivery usage is calculated for the number of delivered events in the last 24 hours. As time goes by, the usage is updated. The event publishing limit is checked when a new event is published. The event delivery limit is checked when a new event is received.

To learn more about how event usage is calculated against your event allocations, see Learn About Daily Rate Limits in the App Development Without Limits Trailhead module.

Default Allocations 

Description Subscriber Clients Performance and Unlimited Editions Enterprise Edition and Professional Edition (with API Add-On) Developer Edition
Event Delivery: maximum number of delivered event messages in the last 24 hours, shared by all clients.

To increase this allocation by purchasing an add-on, see Which Allocations Can Be Increased? .

This allocation applies to:

Yes Pub/Sub API

Yes CometD

Yes empApi Lightning component

Yes Event relays

This allocation doesn’t apply to:

No Apex triggers

No Flows

No Process Builder processes

50,000 25,000 10,000
Event Delivery for Salesforce Order Management: maximum number of delivered event messages in the last 24 hours, shared by all clients.

This allocation is provided with the purchase of a Salesforce Order Management license.

This allocation applies to:

Yes Pub/Sub API

Yes CometD

Yes empApi Lightning component

Yes Event relays

This allocation doesn’t apply to:

No Apex triggers

No Flows

No Process Builder processes

100 100 100
Event Delivery for Bring Your Own Channel for Messaging and Bring Your Own Channel for CCaaS: maximum number of delivered event messages in the last 24 hours, shared by all clients.

This allocation is per license and is provided with the purchase of Digital Engagement, Contact Center, or Einstein 1 Service.

This allocation applies to:

Yes Pub/Sub API

Yes CometD

Yes empApi Lightning component

Yes Event relays

This allocation doesn’t apply to:

No Apex triggers

No Flows

No Process Builder processes

25,000 25,000 25,000
Event Publishing: maximum number of event messages published per hour.

To increase this allocation by purchasing an add-on, see Which Allocations Can Be Increased?

In addition to the event publishing allocation, daily API request allocations are consumed if you publish events with REST API, SOAP API, or Bulk API. If you publish events with Pub/Sub API, Apex, flows, or processes, the daily API request allocations aren't consumed. See API Request Limits and Allocations in the Salesforce Developer Limits and Allocations Quick Reference .

This allocation applies to all publishing methods, including:

Yes Apex

Yes Pub/Sub API

Yes REST API

Yes SOAP API

Yes Bulk API

Yes Flows

Yes Process Builder processes

250,000 250,000 50,000

Why Is the Publishing Allocation Higher than the Delivery Allocation? 

The set of clients that the publishing allocation applies to is different than the one for the delivery allocation. The publishing allocation applies to all publishing methods. The delivery allocation applies to a subset of clients. It doesn’t apply to Apex triggers, flows, and Process Builder processes. For example, if you use Apex to publish events and an Apex trigger to subscribe to events, you consume the publishing allocation and not the delivery allocation. In this case, you can publish and process more events with the higher publishing allocation than when using other types of subscriber clients. Alternatively, if you use Apex to publish events and Pub/Sub API to subscribe to events, both the publishing and delivery allocations apply.

Even though Apex triggers, flows, and Process Builder processes don’t count against the event delivery limit, their event processing rate depends on the subscriber processing time and volume of events received. A higher processing time and event volume means that it takes longer for the subscriber to reach the tip of the event stream.

Note

How to Avoid Exceeding Event Allocations 

Proactively monitor your event usage. For more information, see Monitor Event Usage Against Your Allocations and Monitor Event Usage with SOQL Queries by Using PlatformEventUsageMetric. When your event publishing usage gets close to the allocation, try these methods to reduce the consumption of delivered events.

  • Use stream filtering to reduce the amount of events delivered to the subscriber and receive only relevant events. For more information, see Filter Your Stream of Platform Events with Custom Channels.
  • Make sure you don’t have unnecessary subscribers. Each event delivered to a subscriber counts against the event delivery allocation.

What to Do If You Exceed the Event Publishing Allocation 

If you exceed the hourly event publishing allocation, the publish call fails with the LIMIT_EXCEEDED error. When the limit’s reached, the events aren’t published or queued. You must wait for the limit usage to decrease, and then republish the events.

What to Do If You Exceed the Event Delivery Allocation 

If you exceed the default event delivery allocation, an error is returned and the subscription is disconnected.

  • The error you receive in a CometD client is: 403::Organization total events daily limit exceeded. The error is returned in the Bayeux /meta/connect channel when a CometD subscriber first connects or in an existing subscriber connection. For more information, see Streaming API Error Codes in the Streaming API Developer Guide.
  • The error code that you receive in a Pub/Sub API client is: sfdc.platform.eventbus.grpc.subscription.limit.exceeded. And the error message is: You have exceeded the event delivery limit for your org.

When the client reaches the event delivery allocation, perform one of these steps.

  • Keep the subscriber disconnected for a temporary time. While the subscriber is disconnected, the event usage for the last 24 hours decreases after some time. The events received in Salesforce during the disconnected state are stored for the retention period of 72 hours. After usage decreases, resume the subscription from where it left off and receive events. You can retrieve stored event messages with Pub/Sub API and CometD using the Replay ID.
  • If you reach the event delivery limit often and your event volume is high, consider purchasing an add-on to increase your event allocations by contacting your Salesforce Account Representative. See Which Allocations Can Be Increased?

Which Allocations Can Be Increased? 

You can increase the event delivery allocation via a platform events add-on. To purchase a platform events add-on, contact your Salesforce Account Representative. The add-on moves your event delivery usage to a monthly entitlement model and allows for spikes in usage. The add-on also increases your event publishing allocation for platform events. See Increase Your Event Delivery and Publishing Allocations with a Platform Event Add-On License.

See Also