
Event-driven communication is a method of interaction between components or systems where messages, called events, are sent to signal the occurrence of specific actions or changes. Depending on the framework, event-driven communication can be synchronous or asynchronous. In synchronous communication, the event producer waits until the event has been consumed by all registered consumers. In asynchronous communication, the event producer does not wait after sending the event.
Event driven communication consists of three parts: The event producer, the event consumer, and the event channel.
- Event Producer
An Event Producer raises an event when something significant happens (for example, a new flight travel is created). The producer does not know or care if there are any consumers for the event and never receives any feedback.
- Event Consumers
Event Consumers listen for and react to specific events (for example, updating logs, sending notifications). The consumers must know the event producer and they actively register to receive the events they are interested in.
- Event Channel
An event channel is the medium through which events are transmitted (for example, a message broker or an event bus). The channel administers the registrations, receives the events, and distributes them to the registered consumers.
In essence, event-driven communication is like a publish-subscribe model, where event producers publish events to the event channel, and event consumers subscribe to the types of events they are interested in. It allows for a dynamic and decoupled communication pattern.

RAP supports event-driven communication natively by enabling business objects to publish and trigger events. These events are called Business Events to distinguish them from the events of other event-based communication concepts in ABAP.
Business events usually represent a significant change of state of the RAP business object, or of one of its children, that is relevant for follow-up processes. For example, when a new travel is created, you can enable consuming applications to trigger more actions with the help of business events.
Business event consumption is always asynchronous and supports internal and external consumers. To make a business event visible for external consumers, it is necessary to create an Event Binding. Event bindings are ABAP repository objects that enable the developer to map the relevant information to be sent to a business event to the SAP event infrastructure.
Similarly, ABAP code must define an Event Consumption Model to be able to receive and consume events from external applications.


