## 5.6.2.3 Enable the Consumption of SAP S/4HANA Cloud Events
To create event-based extensions for SAP S/4HANA Cloud you need to set up the messaging between the SAP S/4HANA Cloud system and the SAP Event Mesh.
## Prerequisites
- You have registered an SAP S/4HANA Cloud tenant in the global account in SAP BTP. See Register an SAP S/4HANA Cloud System in a Global Account in SAP BTP [page 2048].
## Context
To consume SAP S/4HANA Cloud events, you need to configure the connectivity between SAP Event Mesh and the SAP S/4HANA Cloud tenant. To do so, you need to create and configure service instances for both SAP S/4HANA Cloud Extensibility service and SAP Event Mesh.
When you create a service instance in a subaccount, an event bus for this subaccount is created. All service instances in a subaccount point to the same event bus and are nothing else but clients providing access credentials for the event bus. You configure the clients using JSON descriptors. Each client has its own name which can be configured with the emname parameter in the JSON descriptor file. Thus, the client is identified with a human readable name instead of a GUID. The name of each client must be unique. As all of the clients point to the same event bus, they must have different namespaces in which to publish events. Each namespace must be unique per subaccount. Each client should publish only in its own unique namespace.
## Communication flow
The SAP S/4HANA Cloud Extensibility service instance is the client which creates the SAP S/4HANA Cloud integration and provides the credentials for the SAP S/4HANA Cloud system so that the SAP S/4HANA Cloud system can send events to that event bus. The purpose of this client is to send messages to a topic. It sends messages to the namespace which was configured while creating the service instance of S/4HANA Cloud
Extensibility service. See Define SAP S/4HANA Cloud Extensibility Service Descriptor JSON/YAML File [page 2145]
The SAP Event Mesh service instance is the client which receives the events. This service instance must have a different name and a different namespace than the ones configured for the SAP S/4HANA Cloud extensibility service instance. Since the purpose of this client is to receive messages from a different client the rules have to take care of that. So, for the SAP Event Mesh service instance, you need to configure the subscribe filter to the SAP S/4HANA Cloud Extensibility service instance. See Define SAP Event Mesh Service Descriptor JSON/YAML File [page 2158].
After both instances are created and configured, you can create the topic-to-queue subscription. To do so, you first create a queue in the client that refers to the SAP Event Mesh service instance and then subscribe the topic of the namespace of the SAP S/4HANA Cloud Extensibility service to that queue. See Manage Queues in the SAP Event Mesh documentation
The service instance of SAP Event Mesh is the client which consumes the message and should be bound to the extension application.
## Procedure
To configure the connectivity between SAP Event Mesh and the SAP S/4HANA Cloud tenant so that SAP S/4HANA Cloud events can be produced and then consumed by applications running on SAP BTP, you need to perform the following tasks:
1. Add the required quotas to your subaccount as follows:
1. Assign the messaging SAP S/4HANA Cloud Extensibility service plan to the subaccount in SAP BTP you want to pair with the SAP S/4HANA Cloud tenant. See Configure the Entitlements for the SAP S/4HANA Cloud Extensibility Service [page 2114].
##  Note
You can use the service plan on regions where the SAP Event Mesh service is available.
##  Note
The messaging service plan enables the Enterprise Eventing Integration (SAP\_COM\_0092) communication scenario which allows you to consume SAP S/4HANA Cloud events and create event-based extensions.
This service plan has been renamed from sap\_com\_0092 .
2. Assign the required number of SAP Event Mesh instances to the subaccount in SAP BTP that you want to pair with the SAP S/4HANA Cloud tenant. See Configure the Entitlements for SAP Event Mesh [page 2139].
2. Configure the connectivity between SAP Event Mesh and the SAP S/4HANA Cloud tenant, and then configure event topics for the channel inside SAP S/4HANA Cloud tenant. See Set Up the Connectivity Between Event Mesh and the SAP S/4HANA Cloud Tenant [page 2140].
3. Enable the SAP Event Mesh for your subaccount in SAP BTP, create a queue that is specific to your application, and then subscribe this queue to the channel topic that the SAP S/4HANA Cloud tenant uses to produce events. See Enable the SAP Event Mesh Service for Your Subaccount in SAP BTP [page 2154].
## Related Information
What Is SAP Event Mesh?