Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [cometd]

The tag has no usage guidance.

1
vote
0answers
17 views

Platform event subscribers on Visualforce page not being called always when platform event is published

We have an implementation in which there are multiple Visualforce pages(seven pages). These pages are using platform events to communicate between each other. The JavaScript code to subscribe to ...
4
votes
0answers
72 views

lightning:empApi is not working in summer19's sandbox: 403::Unknown client

I am receiving errors in lightning:empApi in the console. It was working fine before summer19 release in the sandbox. It works fine in scratch org. Scratch org is also on summer19. The error is ...
0
votes
1answer
100 views

How to solve inconsistent 403::Unknown Client error on subscribe when using lightning:empApi

Every other time I attempt to use the lightning:empApi component to subscribe to a Push Topic channel the EMP API component reports error '403::Unknown Client' After the EMP API component reports the ...
0
votes
0answers
114 views

Understanding who is consuming Platform Events, and how much, is it possible?

When a platform event is fired, it is consumed from whichever client is subscribed to its specific channel. If a single event is fired and consumed by 5 consumers, it will count 5 against the Daily ...
1
vote
0answers
48 views

Unable to set component attribute on message received from lightning:empAPI

I have the following lightning component implemented and when a message is received I can obtain attribute data from the component but when trying to set an attribute it doesn't seem to set it, the ...
10
votes
1answer
406 views

Cannot subscribe to platform events using cometd

I am trying to subscribe to a platform event using cometd. I have asserted that the event is getting published just fine but its subscribing that is an issue. I have placed console logs in the cometd....
4
votes
1answer
517 views

Unable to subscribe to platform event using emp api

I am trying to subscribe to my platform event using the empapi feature. This feature was added in v44. I am following the example of the documentation page: https://developer.salesforce.com/docs/...
4
votes
0answers
154 views

Using cometD in visualforce page

I am trying to use CometD with my platform events. I've added a basic use case for the time being for clarity: * I have a platformevent and a trigger. Whenever a client (custom object) gets edited, a ...
3
votes
1answer
326 views

Subscribe to multiple channels using CometD

I'm trying to subscribe to multiple channels with CometD. I'm using the CometD static resource and syntax as per the Trailhead project: https://trailhead.salesforce.com/projects/workshop-platform-...
2
votes
0answers
52 views

Problem encountered while setting cometdReplayExtension

Good morning my friends, I'm having a problem trying to set up the dp cometd extension so that a ligthining component can process published events before its subscription. Below is my component, ...
1
vote
1answer
135 views

Initialise streaming client on button click, rather than init

I am using Mr Fawcett's the famous streaming component (https://github.com/afawcett/streamingcomponent) with his another great wrapper for deploying Custom Metadata Types (https://github.com/afawcett/...
1
vote
1answer
302 views

Platform Event for Guest Community User?

Can platform events be used for the unauthenticated guest user for communities? Looking to have a public-facing page that displays live statuses without requiring a log in. Streaming API appears to ...
2
votes
1answer
323 views

How to publish Platform Event from aiosfstream python library?

I'm trying to consume/publish Platform Events using aiosfstream python library. There is a publish() function but I always get an error response: aiocometd.exceptions.ServerError: ('Publish request ...
6
votes
2answers
301 views

Cometd not working in summer 18

We have been using cometd with pushTopic. But we facing an issue an issue in summer 18 org that handshake with cometd is failing in lightning component. if we use lightning component directly in ...
0
votes
1answer
70 views

Do I need to re initialize longpolling client with new access token on every connection session timeout?

Sample code how I'm initializing LongPollingTransport to create Bayeux client for subscribing pushtopic , LongPollingTransport transport = new LongPollingTransport(options, httpClient) {...
1
vote
1answer
391 views

Streaming API in Lightning Component getCallback error

I'm making a StreamingAPIListener Lightning component, built on this code from @Eric. (Thanks Eric.) The component loads up cometd from static resources, then runs doInit, which calls setupPushTopic, ...
2
votes
1answer
197 views

CometD / Streaming API: Firing an event inside of PushTopic's action throws a TypeError exception in Lightning Component

Let's consider a Lightning component with a single button and which uses a CometD / Streaming API to handle some server actions. A button click calls a server-side controller's action which inserts a ...
2
votes
0answers
100 views

Salesforce Java Streaming Client filtered subscription

I am subscribing to a push topic from a Salesforce Streaming java client that uses the cometd and bayeux libraries. I found this page which says that filtered subscriptions are supported in streaming ...
9
votes
2answers
2k views

CometD Issues when subscribing to Platform Events

I am using the notification Console Component described in this trailhead: Subscribe to Platform Events Trailhead I am able to get it working, and the majority of the time I have no issues. However, ...
0
votes
1answer
826 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
186 views

Does Authorization using a OAuth access token work for CometD?

I keep getting a 401 response from the handshake end point https://na73.lightning.force.com/cometd/39.0/handshake after making a post request with the following header setting Authorization:Bearer ...
0
votes
1answer
417 views

Subscribe Salesforce without using EMP Connector

I am writing a java application where a change in Salesforce Account should hit my java application through Streaming API.I gone through various articles and I found it can be achieved through Emp ...
0
votes
1answer
97 views

Need some more information on Salesforce Streaming API

While exploring Streaming API, found the API documentation and have gone through that. To integrate this the documentation mentions that Bayeux client is needed, for which CometD API is suggested. I ...
4
votes
3answers
2k 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 ...
2
votes
1answer
717 views

How to use latest cometd version in Salesforce StreamingAPI

Following the instructions here I was able to set up StreamingAPI in my org with cometd version 2.2.0. Salesforce are now advising that we upgrade to at least 3.0.9 so I've downloaded the latest ...
3
votes
2answers
239 views

Unable to call Application Event from VF Page

In the VF page myExternalEvent is undefined so, code throws exception. Following code was working fine before winter 17. $Lightning.use( "nm:myApplication", function () { $Lightning....
2
votes
1answer
200 views

Salesforce streaming API issue in version 37

I am using the salesforce java streaming API code that is provided in the salesforce documentation. Code is working fine. But when I use the CometDReplyExtension for getting the events based on ...
11
votes
2answers
236 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 ...
3
votes
1answer
404 views

Streaming API: subscribe callback function never called?

I've implemented a simple streaming api code for subscription to the push topic using a callback function. It's realy needed because the official CotemD documentation expressly points to it: ...