SAP AEM to Kafka Header: Passing Properties Dynamically

Saturday, May 10, 2025 1:37 pm ET1min read

This blog post describes how to pass properties from SAP AEM to Kafka headers. It explains how to create a dynamic AEM topic based on Kafka headers and how to filter Kafka events without using BTP Integration Suite. The post also demonstrates how to test the setup using a BTP Integration Suite IFlow.

In the realm of enterprise software, seamless integration between different systems is paramount for efficient operations and data management. This article explores how SAP AEM (Adobe Experience Manager) can be integrated with Apache Kafka to create dynamic topics and filter events effectively.

Introduction

The integration between SAP AEM and Kafka allows for the passage of properties from SAP AEM to Kafka headers. This enables the creation of dynamic AEM topics based on Kafka headers, facilitating better event filtering and management. The process involves two main components: a Kafka sender and a Kafka receiver.

Kafka Sender

The Kafka sender is responsible for sending events from AEM to Kafka. In this setup, the sender uses a custom header to pass properties such as business partner group and business partner number. These properties are stored in the Kafka headers, allowing for dynamic topic creation.

For instance, if the business partner group is "0001" and the business partner number is "0000000181", the Kafka topic would be "sap/businessPartner/0001/0000000181". This dynamic topic creation ensures that events are published to the correct topic based on the properties passed from AEM.

Kafka Receiver

The Kafka receiver is responsible for consuming events from Kafka and passing them to the appropriate AEM topic. Traditionally, the receiver would pass events to a static AEM topic. However, by incorporating dynamic topic creation, the receiver can now pass events to a topic that is dynamically generated based on the Kafka headers.

For example, the receiver can construct the AEM topic as "KafkaBusinessPartnerReceiver/${kafkaHeaderAsString("businesspartnergroup")}/${kafkaHeaderAsString("businesspartnernumber")}". This allows for the dynamic creation of AEM topics, ensuring that events are directed to the correct destination.

Testing and Conclusion

To test the setup, a BTP Integration Suite IFlow was created to consume the KafkaBusinessPartnerReceiver topic. This IFlow allows for the verification of the dynamic topic creation and ensures that events are correctly filtered and passed to the appropriate AEM topics.

The integration of SAP AEM with Kafka not only enhances the filtering capabilities of Kafka events but also eliminates the need for additional tools like BTP Integration Suite in between. This setup allows for more efficient data management and event processing.

References

[1] https://community.sap.com/t5/technology-blog-posts-by-sap/how-to-pass-properties-from-sap-aem-to-kafka-headers-amp-build-dynamic-aem/ba-p/14098091

SAP AEM to Kafka Header: Passing Properties Dynamically

Comments



Add a public comment...
No comments

No comments yet