Questions tagged [streaming-api]

The Force.com Streaming API lets you expose a near real-time stream of data from the Force.com platform. Streaming API delivers events that are either tied to changes in Salesforce or based on custom payloads.

Filter by
Sorted by
Tagged with
7
votes
2answers
3k views

The better way to import cometD library into LWC

I've been trying to use empAPI on community but unfortunately it's impossible. So I found this staff from trailhead https://github.com/forcedotcom/EMP-Connector.git Could anyone please describe me ...
4
votes
1answer
4k views

Streaming API in Lightning Component API 40

I see several blog post around Lightning and Streaming API integration but it seems not working due to authorization failure and don't complain any error for API version greater than 36, I tried to ...
17
votes
3answers
14k views

What is the difference between the Streaming API PushTopic, Generic Streaming and Platform Events

Salesforce offers two variants of the Streaming API - PushTopic and Generic. In Summer '17 (v40.0) Platform Events are now also Generally Available (GA). How do they differ and why would you use one ...
3
votes
1answer
324 views

LWC + Apex from EMP Api callback : Firing dispatch event or an apex call from Streaming api callback fails in LWC, any workaround?

When a dispatch event or an imperative apex call is made from a streaming api callback, then it throws this error in browser console window and reloads the page . {"event":{"descriptor&...
7
votes
1answer
2k views

Can a Customer Community user access PushTopics for Streaming API?

I have a PushTopic created, and have a VF page with some js in it that subscribes to the topic and logs any results to the console. I've verified that I'm getting results if I'm logged in as a ...
4
votes
2answers
2k views

Change Data Capture

With the new Change Data Capture tool coming out soon, why would someone use this over Platform Events? My understanding is that CDC utilizes Platform Events under the hood anyways.
14
votes
1answer
859 views

Streaming API MVEL Operators

Do the MVEL operators for filtered subscriptions described in Streaming API documentation really work? I've tried a few variations of this (i.e. with/without quotes, double/single == etc.): j$....
4
votes
3answers
2k views

Can the cometd library be used in Salesforce to listen to external buses?

I'll confess up front that my knowledge of event architecture is limited: Can the cometd library that we can use to listen for Streaming API and Platform Events also be used to listen to external (i....
1
vote
2answers
2k views

How to use "jsforce" in an external HTML client for streaming api?

I am trying to use streaming API feature of salesforce, and be able to subscribe to the topic in an external client which is HTML based. My code is below: <html> <head> <...
12
votes
2answers
7k views

Real time updates - Streaming API vs workflow Outbound messages

My organization has a requirement that if anything is updated/inserted in our web application (cloud based application built in ASP.net and c#) that it should be automatically be updated in SFDC and ...
9
votes
3answers
6k views

Find current API version in Apex

I'd like to get the current API version in Apex. Is this possible without issuing a call to e.g. REST api? I post messages to a streaming channel via:- string uri = URL.getSalesforceBaseUrl()....
11
votes
2answers
261 views

How can I use jQuery 1.11+ while also using Streaming API?

Original Question: What's the lastest version of CometD that can be used with Streaming API? In Salesforce Streaming API documentation, it says Salesforce uses CometD version 2.0. But in their code ...
10
votes
2answers
2k views

Is Streaming API supported in Lightning components?

I'm trying to convert a Visualforce/Angular app into a Lightning app, which has translated well so far. The last hurdle is to utilize the Streaming API to track updates. I haven't found any samples ...
6
votes
2answers
1k views

PushTopic Test: Duplicate Name Bug?

I am writing a test class for a utility class for inserting PushTopics. Despite explicitly setting @isTest(SeeAllData=false) on my test class, I am getting a System.DMLException because of a ...
6
votes
2answers
2k views

Streaming API : not getting updates for some standard fields

I have created a PushTopic from my salesforce developer account using following query : SELECT Id, FirstName, LastName, Name, Email, Contact_Status__c, Contact_Verification__c, Gender__c, ...
4
votes
3answers
4k views

Lightning components, CometD - Refused to connect to ... because it violates the following Content Security Policy directive

I am trying to build a Lightning component by an example from Salesforce Developers Youtube channel, here is original video: https://youtu.be/G931jWBnxHU?t=42m26s So author encaplulated code for ...
4
votes
1answer
1k views

How can I avoid Streaming API Limits Developer Edition

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 ...
2
votes
1answer
2k views

Cannot subscribe to Capture Data Changes (CDC) channel using EMP Connector

I'm trying to implement CDC using the EMP Connector sample. I run it against the sandbox and try to subscribe to channels such as /data/ChangeEvents or /data/AccountChangeEvent. I always get this ...
2
votes
3answers
628 views

What are the available /systemTopic/ channels in the Streaming API?

There appear to be at least two Streaming API channels that don't require a PushTopic to be created. /systemTopic/Logging for ApexLog from Using the ApexCSIAPI that backs to Force.com Console to pull ...
1
vote
0answers
332 views

Push topic and empApi filtered subscription not working after record page refresh (F5) [duplicate]

I need to use filtered subscription using lightning:empAPI for Push Topic notifications. But it does not work with Id filter after records page refresh (F5) whereas when it subscribes on the first ...
0
votes
1answer
656 views

403::Unknown Client Salesforce Workbench Push Topic

I have an object in Salesforce that I am trying to subscribe to using a Push Topic that I created. But when I try to subscribe to that push topic from Workbench I get 403::Unknown Client exception. ...
0
votes
1answer
3k views

"Cannot add property context, object is not extensible" error during CometD handshake in Lightning Component

I'm trying to set up a Lightning component to listen for Platform Events and the above error occurs while CometD is handshaking. What's interesting is I've tried the code in a Dev org and did not run ...
0
votes
1answer
2k views

How can I use PushTopics in Lightning Components

I have been through the Salesforce streaming API demo, and got that working. For anyone wanting a reminder, the page looks like this <apex:page > <apex:includeScript value="{!$Resource....