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 [platform-event]

Platform events are part of Salesforce’s enterprise messaging platform. The platform provides an event-driven messaging architecture to enable apps to communicate inside and outside of Salesforce. Custom data in your events are stored in custom fields that you define.

0
votes
1answer
10 views

Salesforce Platform Events and JMS

Could anyone please explain me what is the connection between JMS ans Salesforce platform event? Is both are doing the same job?
-1
votes
0answers
20 views

Subscribe is not called for Platform Event in Lightning component in Api 45.0? [on hold]

Subscribe is not called for Platform Event in Lightning component in Api 45.0 subscribeToPlatformEvent : function ( component, helper, that ){ console.log( "subscribeToPlatformEvent" ); const ...
2
votes
0answers
27 views

Error handling when publishing platform events

We are in the process of redesigning our system to use platform events as a replacement of traditional trigger-based approach when all processing happen synchronously sharing single transactional ...
1
vote
1answer
16 views

Platform Event batching

I have a simple Platform Event called Timesheet_Approval__e. As a test, I publish a batch of 1000 events with this anonymous apex: List<Timesheet_Approval__e> approvals = new List<...
0
votes
1answer
24 views

Can we create platform event dynamically without using UI? [closed]

I want to create a platform event dynamically using any programming language. But I didn't find any API. Can you please tell me I can make platform event dynamically?
1
vote
2answers
34 views

Possible to use Process Builder subscribed to Platform Event to create New Record?

I know it's possible to create a Process Builder that executes based on receiving a Platform Event but is it possible to use the Process Builder to simply create a new Record every time an event is ...
0
votes
0answers
73 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
votes
1answer
36 views

Platform Events Subscription through Trigger and parsing a JSON payload field [closed]

We are going to implement platform events for inbound integration and subscribe to events using trigger. Among the platform event object, one of the fields is a long text area which has a JSON payload ...
0
votes
1answer
36 views

Use Platform Event or Streaming API?

I am new to Salesforce Platform event and streaming API topics. After riffling through some documentation and getting enough confused, asking out for help here if anyone can suggest me the best ...
3
votes
3answers
191 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....
0
votes
0answers
30 views

Change Platform Event Notification on Click

We are using the platform events to deliver the custom lead notifications through apex class. Database.SaveResult result = Eventbus.publish(leads); When the user clicks on the notification message, ...
1
vote
1answer
49 views

Pass in array to salesforce platform event?

I am using platform events and trying to send in some parameters to the platform event from an external system. One of the parameters is an array, but I am getting an error from salesforce. The only ...
0
votes
1answer
21 views

What is the window of messages in Platform event after published by sales force

What is the window of messages in Platform event after published by sales force and Is replay Id is getting reset after that
8
votes
0answers
90 views

How to convert Standard Volume Event into High Volume Platform Events?

With Spring 19, High Volume platform events are generally available. Now I want to convert my existing standard volume event into a high volume event. I tried editing the event object in Setup, it ...
0
votes
0answers
66 views

WebSocket connection to '' failed: Error during WebSocket handshake: Unexpected response code: 405

I am trying to subscribe to platform events on VF page. But getting WebSocket connection error. Not sure what am I doing wrong. <apex:includeScript value="{!URLFOR($Resource.cometd, '/newCometd/...
2
votes
1answer
35 views

Serial/sequence number in Platform Events fired

(Sorry for the long description but I promise it will compel you to put on your thinking caps) We have a scenario wherein we have several platform events to which external systems within my ...
2
votes
0answers
37 views

View Platform Event External Subscribers

I created a platform event, i can able to publish that event to an event bus in salesforce, I can able to subscribe to that event within salesforce and also externally. I can fetch the subscriber ...
0
votes
0answers
31 views

Issue In platform event after Insert Calling twice due to Process builder

I have created one platform event and publishing the json in it on account creation. I have one Process builder which populating the field on account creation. the issue is my Platform event is ...
0
votes
0answers
38 views

Sending External ID Fields in change data capture(CDC) payload

We have an external system(legacy) from where we will data convert and move the data to salesforce. Lets say the object name is 'Relationship'. every time later when data changes in salesforce for ...
4
votes
1answer
59 views

Do Apex Transaction have a unique Id (like Batch Ids)?

I am working on a Platform Event based Logging Framework (based on the ideas of Andrew Fawcett's Dreamforce session). I want to visually group Log entries of the same transaction or batch. Batch ...
0
votes
0answers
25 views

Lightning: Standard events are not firing in some Sandboxes

I have created a custom lightning component for users to create new Case from the Account related tab. However standard events such as "navigateToSObject", "navigateToObjectHome" are not firing after ...
3
votes
1answer
116 views

Get all platform event definitions via REST API

Is it possible to retrieve the list of all platform event definitions using REST API? If I have an event name, I can get its definition using data/v40.0/sobjects/<EventName>/eventSchema but ...
-1
votes
2answers
40 views

what is the core benefit of platform events [closed]

As per my understanding platform events are immutable and we can't query it. but how to relate with external system and internal system. please share any example for both internal and external system. ...
3
votes
1answer
153 views

Platform Event - lightning:empApi

I am using platform event and subscribing them in a lightning component. When i use my component as standalone lightning app or use it on lightning record page, the components subscribe well to the ...
2
votes
2answers
363 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.
9
votes
3answers
154 views

Platform Event Apex trigger limits exception - where does it go?

If one publishes a Platform Event, the consuming trigger executes as Automated Process user. If that consuming trigger exceeds CPU limits, no notification is sent to the developer(s). Even though ...
1
vote
2answers
46 views

Platform events and Chatter Posts

I am subscribing to platform events in apex trigger. In the trigger I am trying to post to user's chatter feed using Chatter Connect API. I am aware that in this case the context is "Automated Process"...
2
votes
2answers
161 views

How to clear/delete published Platform event from EventBus after sometime?

I'm publishing Platform Events using APEX Code EventBus.publish method and consuming the events in backend Java app using EventListener. Problem All the published events remains in EventBus and ...
1
vote
0answers
43 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 ...
2
votes
1answer
110 views

Platform Events + Process Builder + Apex with @future method

I'm running into an issue with too many future calls when handling Platform Events with a Process Builder that uses an invocable Apex class. Basic setup is 2 processes: The first publishes an event ...
4
votes
2answers
895 views

Consuming Platform Events on Microservices

I am having few issues designing an architecture to use with Platform events and Microservices. According to microservices principle(Kubernetes), there should be at least 3(odd number) services ...
2
votes
1answer
59 views

How long is the delay between retries of EventBus.RetryableException?

In Platform Events, if you throw EventBus.RetryableException, the doc states: Events are resent after a small delay. The delay increases in subsequent retries. So, how small is small and how ...
5
votes
1answer
81 views

Platform Event ReplayId - metadata says it is a String of length 1000 but evidence shows it as an integer

Related post on uniqueness of replayIds Using Workbench to examine metadata for the OOTB field ReplayId on any Platform Event SObject (one that ends in __e) shows: bytelength: 3000 length: 1000 type:...
4
votes
1answer
348 views

Unable to subscribe to Platform Event Notifications in a Lightning Component via Lightning Out

The ultimate objective is to detect if a visualforce page (or the lightning component embedded within it) is already being viewed/used by a user when someone else opens it and subsequently restrict ...
3
votes
0answers
49 views

Is it possible for Salesforce Platform Events to cross orgs intentionally? [duplicate]

Let's say, for whatever reason(s) I have two orgs (maybe not me personally, but two businesses doing business together). Let's say org A publishes a Customer_Event__e (for whatever reasons). Would ...
10
votes
1answer
331 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....
3
votes
1answer
340 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/...
0
votes
1answer
81 views

How to get current logged in user id in process builder

I am creating a process builder that will publish an event using platform events. I want the process builder to publish an event only when: The currently logged in user has the same ID as one of the ...
2
votes
1answer
29 views

Public Platform Events which can be subscribe by any Salesforce Org

We would like to generate a public platform event which will be published on a single Salesforce org and it can be consumed by any other Salesforce Org. Few examples of this public platform event ...
8
votes
1answer
69 views

Developer Console query on EventBusSubscriber returns only 1 row

This is too weird and just started happening within the last few days Execute this query in DC (V43 or V44) SELECT Id,LastError,Name,Position,Retries,Status,Tip FROM EventBusSubscriber In DC Only ...
2
votes
0answers
96 views

Architect Solution around Platform Events limits

Am again in a design dilemma on how to architect solution regarding platform events limits. From the API documentation, even though I can publish 2.4Million Events in a day, the Comet D client(Java ...
1
vote
2answers
86 views

Can Salesforce Platform Events be Relied on as an Async Solution?

Recently I was working on a project where, in order to deal with recursion and governor limits, the previous developer decided to send Platform Events, with the expectation that the very same ...
6
votes
2answers
103 views

Platform Event throws RetryableException and then SFDC stops the trigger from consuming events for hours

Use case: Apex Foo.trigger subscribes to Foo__e platform event Hundreds of events happily processed On event n, Apex trigger executes and, for application-defined reason, decides it has to throw ...
0
votes
1answer
54 views

VF Email templates Boolean merge fields Automated Process User is always false

Use case: Trigger subscribes to Platform Event (hence running user = Automated Process) Trigger creates SObject w/ checkbox field set to TRUE Process Builder executes based on SObject values, ...
2
votes
1answer
232 views

Apex Platform Events Subscriber not always triggered

I am currently trying to troubleshoot a Platform Events implementation that seems to behave inconsistently. Here's the current architecture: I have an Apex Trigger on the Account SObject, where I ...
2
votes
1answer
173 views

Publishing platform event using trigger?

I'm trying to stream changes to tables such as Accounts to a handler that will update our data warehouse. I tried pushtopics but ran into limitations in query size and longtext fields, so now I'm ...
0
votes
1answer
195 views

how to retreive missed replay ids in platform events

when we publish an event in salesforce , i want to retrieve all the replay ids that are missed/ left without subscription. I have read in the same site that: Platform events form an ordered time ...
3
votes
1answer
102 views

Process Builder can't access Platform Event parameters in formula?

I created a Platform Event, and now I'm building a process that is triggered by the Platform Event. The Platform Event parameters either contain a ContactId or a LeadId, but not both. The process I'm ...
4
votes
2answers
290 views

For the Platform Event “Automated Process” user, why do both Visualforce controller access and email sending fail?

We are executing some asynchronous code that uses getContentAsPdf on a Visualforce page as the result of handling custom platform event and we get this error in the Apex Jobs listing: First error: [...
1
vote
1answer
102 views

Platform Events process old data

Sometimes when I publish platform event on change of certain Record, Platform Event Trigger fires with old data. If I publish event on insert, sometimes record is not visible for query. To test it on ...