Find your content:

Search form

You are here

How can I avoid Streaming API Limits Developer Edition

 
Share

I'm using Salesforce Streaming API to handle agent status in a Call Center application, every time the agent make a call or is answering one agent status is changing and as I'm suscribed to a push topic it is generating event.

I would like to know how to avoid the limits or the best practices to use Streaming API.

I checked Streaming API limits information in this link (http://www.salesforce.com/us/developer/docs/api_streaming/Content/limits.htm) but maybe exist something that can give the best way to implement this approach.

Thanks


Attribution to: Yucel

Possible Suggestion/Solution #1

You can take advantage of the URL parameters to get the right data for each of your agents. So instead of creating a PushTopic for each person, you can use one master PushTopic that lives around the appropriate interface and parameterize the client subscriptions.

You can insert a PushTopic like:

insert new PushTopic(
    Name        = 'Doers',
    Query       = 'SELECT Id, Doer__c FROM Object1__c', //WHERE <snip>
    ApiVersion  = 29.0
);

Update:

basic filtering available in the form:

/topic/MyTopic?User__c=005A0000000gqi6IAA

Conditions can be combined by using an & for example:

/topic/MyTopic?User__c=005A0000000gqi6IAA&Id={ID-18Char}

This translates into OR condition: User__c == 005A0000000gqi6IAA OR Id == {ID-18Char}

This is not nearly as robust as MVEL operations but can help reduce the number of received events


Attribution to: bigassforce
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/30202

My Block Status

My Block Content