function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mayur Gandhi 27Mayur Gandhi 27 

PushTopic limit exceeding

Hi All,

I have a scenario where I need to insert more than 100 PushTopics. As per Streaming API Governer limits, it allows only 100 PushTopics. Is it possible to increase this limit requesting to salesforce? If yes, what will be the maximum number? If not, is there any other way I can implement this scenario?

Thanks,
Mayur
Best Answer chosen by Mayur Gandhi 27
SwethaSwetha (Salesforce Developers) 
HI Mayur,

There is max number of topics (PushTopic records) per org
Performance and Unlimited Editions = 100
Enterprise Edition= 50
All other supported editions = 40

>>Limits for Push Topic:
https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/limits.htm

You can use the following queries to review the usage
SELECT count() FROM PushTopic
SELECT count() FROM PushTopic WHERE IsActive = true


>>Although this limit can be increased by logging a case with support, it completely depends on your business requirement/impact.Salesforce's recommendation is to ensure that the PushTopics is within the limit defined by salesforce.

>>To avoid the limit, it is recommended to reduce the consumption of push topics.
You can check deactivating a Push Topic by running the below in Execute Anonymous:
PushTopic pt = new PushTopic(Id='0IFIDOFPUSHTOPIC', IsActive = false);
update(pt);

>>Deactivating a Push Topic: https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/deactivating_pushtopic.htm

You can also, delete a Push Topic by running the below:
List<PushTopic> pts = [SELECT Id FROM PushTopic WHERE Name = 'Channel'];
Database.delete(pts);

>>You can remove some of the non-Subscribed Push Topics so that the Limit frees up.
 
Hope this helps you. Please mark this answer as best so that others facing the same issue will find this information useful. Thank you