Pages

Contact Me

Name

Email *

Message *

Wednesday, 5 August 2020

Platforms Events in Salesforce (Part 1/2)


Platform Events simplify the process of communication between two or more systems without writing complex logic. It is built in real-time integration patterns which reduces point to point integrations. 

Platform Events are based on an event-driven architecture which works on Publish-Subscribe pattern. Platform Event trigger runs asynchronously in a separate transaction with fresh governor limits. 

The following diagram illustrates the Publish-Subscribe (Publisher-Consumer) pattern in the Platform Event.



This Architecture consists of 3 components.

  • Event producer: Application/System which publishes messages to the Event bus/Channel.
  • Event Bus: A channel which holds all the messages from publishers. consumers subscribe to the channel to receive messages. Also referred to as the event bus in Salesforce. Order of published Events will be as per first come first serve basis.
  • Event consumer: A subscriber to a channel that receives messages from the channel.

How can a user publish the event? 
 
  • Using Apex Trigger
  • Using Process Builder/ Lightning Flow
  • Using salesforce API from external application
 
How can a user subscribe to the channel?

  • Apex Trigger
  • Process builder/ Lightning Flow
  • CometD ( The empApi Lightning component and Visualforce apps receive event notifications through CometD )


 

0 comments:

Post a Comment