Event Relay Configuration and Event Channels
An event relay configuration includes your AWS account information and a Salesforce event channel that you set up. A named credential contains your AWS account and AWS region information where to relay the events. The event channel is the stream of events in the Salesforce event bus to be relayed to EventBridge. After you create an event relay configuration, Salesforce creates a corresponding partner event source in EventBridge.
Each event relay is associated with a unique channel that is identified by its channel ID. The same channel must not be reused for another event relay.
If you want to stream the same type of event to different AWS regions, create a separate channel for each AWS region, and then create an event relay for each channel.
To stream different types of events, create a channel for each event, and an event relay for each unique channel. For example, you can create an event relay for a channel that contains platform events, and another event relay for a channel that contains change data capture events.
An event relay uses an event channel. A channel is a stream of events in the Salesforce event bus. A single channel can contain platform events or change data capture events, but not both.
A channel groups event messages from one or more events through channel members. For example, for platform events, if MyEvent1__e
is a custom platform event defined in your Salesforce org, the channel receives event messages for MyEvent1__e
if you add a channel member for MyEvent1__e
. If you also want to receive event messages for another event on that channel, such as MyEvent2__e
, add a channel member for MyEvent2__e
.
Similarly, for change data capture, you can create a channel to receive event messages for changes in one Salesforce object, such as AccountChangeEvent. The channel contains one member for AccountChangeEvent. If you also want to receive events for another Salesforce object, add another channel member.
If you’re using a custom platform event, make sure that platform event is defined in Salesforce. In contrast, Salesforce provides change data capture events, so you don’t define them.