Manage the State of an Event Relay
You can run, pause, or stop the execution of an event relay using Tooling API. After you change the execution state, it can take several minutes for the new state to take effect.
When you create an event relay, it’s stopped by default. You start the event relay by changing its state to
RUN. After the event relay is running, events published to the Salesforce event bus are delivered to Amazon EventBridge, provided that you activate the partner event source first. For more information, see Start the Event Relay.
To temporarily pause relaying events from Salesforce to Amazon EventBridge, change the event relay state to
PAUSE. When the event relay pauses, its current state information is saved in EventRelayFeedback. There can be a delay between the time when you set the state to PAUSE and when the event relay is paused. In this case, the saved state information corresponds to the state when the event relay was actually paused.
When you resume a paused event relay later by changing its state to
RUN, the relay of events continues from where it left off. Stored events are relayed from the Salesforce event bus starting after the last relayed event.
To stop relaying events from Salesforce to Amazon EventBridge, change the event relay state to
STOP. When you stop an event relay, its current state information in EventRelayFeedback is deleted.
When you resume a stopped event relay later by changing its state to
RUN, the relay of events starts from new events published to Salesforce. Any events stored in the Salesforce event bus that were received after the relay was stopped aren’t relayed.