Docs / Connectors / Apache Kafka
Apache Kafka Connector
The ASAPIO Integration Add-on connects SAP systems to Apache Kafka brokers directly via the native Kafka protocol – no REST Proxy required. As an alternative, it can connect via a Confluent-compatible REST Proxy, which is described further down on this page.
Also works with Aiven for Apache Kafka
Aiven for Apache Kafka exposes a Confluent-compatible REST Proxy, so the setup below applies directly – no separate connector needed. Find the Host, Port, User and Password for your RFC destination under the Apache Kafka REST tab of your Aiven service.
Native Kafka protocol
The connector sends data to an ABAP daemon, which maintains a constant connection to your Kafka broker. The full setup is documented in the Confluent Connector documentation, as the same connector serves both Confluent and Apache Kafka:
- Check the broker compatibility
- Create the RFC destination pointing to your Kafka bootstrap broker
- Add the cloud adapter and the connection instance
- Configure SASL authentication
Prerequisites
- ASAPIO Integration Add-on – Framework
- ASAPIO Integration Add-on - Connector for Confluent/Apache Kafka
- Only for the REST Proxy setup described below: a Confluent-compatible REST Proxy reachable from the SAP application server – not needed for the native Kafka protocol
Create an outbound interface (Event Studio)
Deploy via the Data Catalog: select the data object, choose the Kafka connection, set the required header fields (see below), and deploy. For advanced configuration including native Kafka protocol, Dead Letter Queues, and Schema Registry, see the Confluent Connector.
After creating the interface in Event Studio, see Header Attributes for message configuration.
Header Attributes
| Attribute | Description |
|---|---|
KAFKA_TOPIC | Target Kafka topic name |
Create an outbound interface (SAP Gui, REST Proxy)
The following steps apply to the REST Proxy connection. For the native Kafka protocol, see above.
Step 1: RFC Destination (SM59)
Create a type G RFC destination pointing to your Kafka REST Proxy endpoint. Configure authentication on the Logon & Security tab.
Step 2: Connection Instance
Set Cloud Type: KAFKA. Configure the default content-type and call method headers. Add error type mapping: response code 207 → Success.
Step 3: Outbound Object
Use the same extraction and formatting function modules as the Confluent connector. Set the KAFKA_TOPIC header attribute to the target topic name.
Step 4: Event Linkage
Link the outbound object to the relevant business object event with receiver FM /ASADEV/ACI_EVENTS_TRIGGER.
Inbound Configuration
Pull-based inbound consumption uses the same Confluent-compatible REST Proxy. Key header attributes:
| Attribute | Description |
|---|---|
KAFKA_DOWNLOAD_TOPIC | Source topic |
KAFKA_GROUPNAME | Consumer group name |
KAFKA_TIMEOUT | Fetch timeout (ms) |
KAFKA_CONSUMER_OFFSET_RESET | Start point for new groups (e.g. earliest) |