Questions tagged [cometd]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
52 views

Issue while using CometD in LWC to subscribe for platform event from another ORG

I am trying to subscribe to Platform event using the LWC component. Platform Event is being published from a different Salesforce ORG and I need to subscribe it in a different Salesforce ORG. I have ...
Dishant's user avatar
0 votes
0 answers
199 views

Streaming API: How to Determine What Channel a User is Subscribed To in LWC or Apex?

I'm trying to determine either on the server or client side if a user is already subscribed to a channel. The Use Case: I would like to use a filtered push topic with different filters, but per the ...
Edwin Schaeffer's user avatar
0 votes
0 answers
95 views

Issue with platform event connection in LWCs dropping

I've developed an LWC that subscribes to a platform event and several message channels. It works as expected most of the time, except when the connection to Salesforce is dropped (or lost) after no ...
Michael Sobczak's user avatar
0 votes
0 answers
95 views

CometD Subscribe not working in experience

I'm trying to listen to a platform event in community and thus implemented CometD. Outside of community it is working as intended, but in community (and even with my Admin user) I keep getting errors ...
Moti Ben Moshe's user avatar
1 vote
0 answers
163 views

Alternative to Change data capture

Since Change data capture event (CDC) is a paid add-on after 5 objects, what alternatives we have to get notified about change in salesforce object ?
SharpCoder's user avatar
1 vote
0 answers
77 views

CometD in Salesforce Mobile?

I have an app using empApi for desktop subscription to a Platform Event, and the version for Communities replaces empApi with cometD. I'm struggling to find an option for Salesforce Mobile. empApi ...
PatMcClellan__c's user avatar
0 votes
0 answers
23 views

Not able to subscribe to Platform events using cometD in visualforce or force.com site [duplicate]

I am trying to subscribe to a Platform event in force.com site page in visualforce page. I am using cometD to subscribe.Using below code. It works internally in org. But when using the page on site ...
Fakeha Quazi's user avatar
0 votes
0 answers
403 views

Error: Cannot read properties of undefined (reading 'cometd') when trying to load CometD in LWC

I want to subscribe to events in a community using the CometD library. Unfortunately when loading the script I get following error: "Error: Cannot read properties of undefined (reading 'cometd')&...
Gerke's user avatar
  • 147
1 vote
0 answers
973 views

How to set up cometD work with Salesforce?

I need help! I am using new community template and I need to show notifications. Community licenses don't support Streaming API, therefor empApi doesn't work. I have to use cometD I am trying to use ...
Gr9988's user avatar
  • 13
0 votes
1 answer
539 views

403::Unknown client - error in cometd subscription response

Im getting a 403::Unknown client error in the response for my subscription request. I handshake no problem. Then i use the clientId from the handshake response in my subscription request but i get ...
discodowney's user avatar
4 votes
0 answers
99 views

How to handle Platform Event while UI is being rerendered?

Use case: We have Digital Experience (i.e Community) where at first we perform the action and after it, we redirect to a new page. This action also publishes Platform Event (Notification) which should ...
ytiq's user avatar
  • 4,465
2 votes
2 answers
485 views

What CometD streaming channels do communities support?

Is there any documentation that says what streaming channels are allowed for communities? (Note that in communities lightning-emp-api methods such as isEmpEnabled never resolve but it is possible to ...
Keith C's user avatar
  • 135k
1 vote
1 answer
1k views

Calling LWC Javascript function from subscribe () method of cometd result in function undefined

Calling the LWC Javascript function from the subscribe() method of CometD results in function undefined. Here is the code: <code> import { LightningElement, api, track, wire } from 'lwc'; ...
user92261's user avatar
1 vote
1 answer
710 views

Streaming API - How do I automatically queue a retry of a failed messages?

I have an implementation of the streaming api using the .NET CometD client to receive PushTopic changes from a Salesforce platform application. Due to the nature of the process it will in turn ...
Kyle J V's user avatar
  • 287
1 vote
0 answers
360 views

Salesforce Streaming / CometD Scaling

Since CometD is a client / server implementation, i.e. messages flow directly from SalesForce into subscribed clients, I'm wondering what options there might be regarding horizontal scaling of the ...
timd's user avatar
  • 11
1 vote
0 answers
656 views

CometD EMP Connector constantly disconnecting after ~6 hours [closed]

I'm using the Java EMP connector to subscribe to a push topic in our Salesforce instance. The only issue I'm having is that the Connector keeps disconnecting itself after roughly 6 hours (always on ...
Dan Coghlan's user avatar
1 vote
1 answer
65 views

How to restrict access to CometD clients to certain Platform Events?

I need to publish multiple events, with different clients subscribing to different type of events. Is there a way to implement policies / permissions to different Channels? So I can restrict clients ...
Harsh Parashar's user avatar
0 votes
0 answers
48 views

Publish Platform Event in SF org and subscribe to it in other org [duplicate]

The requirement is to publish a platform event in one salesforce org and subscribe to it in another salesforce org. In simple words, I need to publish a platform event from a salesforce app/org for an ...
Utkarsh Verma's user avatar
0 votes
0 answers
68 views

Cometd does not receive messages on a Filtered Pushtopic for custom profile

I have a lightning cometd. When I use pushtopic without filter for a custom profile it works. When I add filter, it does not receive the messages. If I login as system admin, the filtered pushtopic ...
Raja Vivekanandhan's user avatar
1 vote
2 answers
2k views

Publishing an event to Salesforce via CometD

I am trying to create a external client to publish Platform events to Salesforce event bus. I have used REST API to do the same but I wanted to do it via a true 'Publish'. My guess is that this will ...
JaganY's user avatar
  • 106
1 vote
0 answers
430 views

Platform Event Limits regarding CometD and non-CometD clients

As per the Salesforce Documentation regarding Platform Event limits, in Performance or Unlimited Editions of Salesforce, maximum number of delivered event notifications within a 24-hour period, ...
nica's user avatar
  • 1,350
6 votes
1 answer
9k views

Platform Event stuck in OPERATION_ENQUEUED status?

I've created a platform event called Review_Event__e in my sandbox, I have a apex class that publishes an event, the debug logs the event was successfully committed but if I monitor Workbench ...
Deployment Failure's user avatar
5 votes
1 answer
548 views

Streaming API Message Reliability and Acknowledgement

How does the Salesforce streaming API ensure message reliability? I understand you can replay events from any replay id within the retention period, but this does not guarantee message delivery. ...
ogoodwin's user avatar
2 votes
1 answer
156 views

cometD does not work in incognito mode [closed]

this is my code renderedCallback() { console.log('render'); if(!this.isUserGuest) { getSessionId() .then(result => { this.sessionId = ...
pincet's user avatar
  • 839
1 vote
1 answer
205 views

Is Salesforce classed as a consumer of Platform events?

As the title suggests, I would like to know if Salesforce is classed as a CometD subscriber to Platform events? In the documentation it mentions there is 25K message limit divided by subscribers, is ...
Deployment Failure's user avatar
5 votes
1 answer
2k views

Consuming platform events on AWS

Salesforce and Amazon announced earlier this year there is a partnership to allow easier sync between the two tech stacks. I recall in a YouTube video AWS product engineers will be able to consume ...
Deployment Failure's user avatar
0 votes
1 answer
549 views

Getting "has established a session, but no BAYEUX_BROWSER cookie present" When Connecting To Platform Events Channel

I am working with this Ruby library (https://github.com/restforce/restforce#streaming) to connect to Salesforce's Platform Events. Here is my code: EM.run do client.subscribe '/event/My_Event', ...
Muaad's user avatar
  • 113
2 votes
1 answer
1k views

Issue with platform event Subscription

A platform event is publishing through an apex trigger and I am trying to subscribe to it using a lightning component, but the lightning component is failing to subscribe every time. It is subscribing ...
raghava ravipati's user avatar
1 vote
0 answers
598 views

Authentication error when connecting to the Streaming API

I want to subscribe to PushTopic events from my Open CTI application. But I can't even connect to a cometd server. Help me find the problem with my solution. Or maybe there are other ways to subscribe ...
Konstantinx's user avatar
2 votes
0 answers
428 views

CometD & empAPI Issues when subscribing to Platform Events [closed]

As we are using Cometd and platform Events to get the communication happen between Asynchronous Apex and Lightning Component(Lightning Out) it's working fine for some times, and getting the following ...
Narendra Nimmana's user avatar
1 vote
0 answers
495 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 ...
ajinkyah's user avatar
  • 751
6 votes
0 answers
340 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 ...
Vishnu Kumar's user avatar
1 vote
1 answer
1k 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 ...
bafuda's user avatar
  • 757
1 vote
0 answers
1k 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 ...
Leandro Ferreira Fernandes's user avatar
2 votes
0 answers
124 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 ...
jonathanwiesel's user avatar
12 votes
1 answer
2k 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....
oijekl's user avatar
  • 221
5 votes
1 answer
3k 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/...
oijekl's user avatar
  • 221
4 votes
0 answers
964 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 ...
oijekl's user avatar
  • 221
3 votes
1 answer
2k 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-...
Aislinn Hayes's user avatar
2 votes
0 answers
170 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, ...
Aleks's user avatar
  • 21
1 vote
1 answer
145 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/...
dzh's user avatar
  • 4,016
5 votes
1 answer
2k 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 ...
Jan Julian's user avatar
  • 2,614
2 votes
1 answer
2k 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 ...
Vladimir Romanov's user avatar
6 votes
2 answers
634 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 ...
Manjot Singh's user avatar
  • 3,406
0 votes
1 answer
447 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) {...
Dipankar Dey's user avatar
1 vote
1 answer
650 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, ...
PatMcClellan__c's user avatar
2 votes
1 answer
425 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 ...
Przemysław Długoszewski-Tamoń's user avatar
2 votes
0 answers
164 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 ...
Bhagyashree Jog's user avatar
10 votes
2 answers
5k 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, ...
Mitch Spano's user avatar
  • 1,525
0 votes
1 answer
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 ...
kacrouse's user avatar