Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Apache Kafka Integration with AEM

navneetadobe
Level 1
Level 1

Hi All,

We are trying to integrate AEM with Apache Kafka and are trying to use Apache Kafka Jars (i.e Kafka-clients & Kafka-avro-serializer) in order to integrate. We are able to build the code and deploy.

But on OSGI we are not able to resolve the dependency as the Apache Kafka Jars are not bundles. We have tried putting in the Import Package and Embed Dependency as well but nothing worked.

Can anyone please help on the same?

1 Accepted Solution
Jörg_Hoh
Correct answer by
Employee
Employee

Apache Service-Mix provides OSGI-ified kafka packages.

 

I integrated it some years back, the code is available at https://github.com/joerghoh/kafka-integration. You probably should update the versions 🙂

 

Jörg

View solution in original post

2 Replies
Vijayalakshmi_S
Community Advisor
Community Advisor

Hi @navneetadobe,

If it is allowed to be installed as separate OSGi bundle outside your project code base, you can make use of simple maven project with maven-bundle-plugin and desired dependency. 

When you try in your local for the first time, you can try with Export-Package -> *. 

Once when you see the bundle being active and functionality works without NoClassDefFound Error, you can explicitly mention the desired packages in Export-Package entry as opposed to "*" -> test the functionality again.

https://myaemlearnings.blogspot.com/2021/02/createbuild-and-install-osgi-bundle-of.html

 

 

Jörg_Hoh
Correct answer by
Employee
Employee

Apache Service-Mix provides OSGI-ified kafka packages.

 

I integrated it some years back, the code is available at https://github.com/joerghoh/kafka-integration. You probably should update the versions 🙂

 

Jörg

View solution in original post