简体   繁体   中英

Add jar to general Kafka Connect classpath in the Confluent Docker

I am using the confluent docker for Kafka connect v4.1.1 and would like to add a jar with specific log4j appenders.
With the classpath isolation by connector, I am not sure where to place that jar in the confluent docker, as it is used by the parent kafka connect itself and not the connectors.

Thanks in advance for the help!

If you want to add a jar that will be used by the Connect framework and is not specific to any of the connectors, you have the following options:

  1. Add the jar to the classpath with:

    -e CLASSPATH=/path/to/custom/library.jar

  2. Copy the jar directly to the directory that includes the Kafka Connect framework. In Confluent docker images this is currently:

    /usr/share/java/kafka

You need to make sure this jar is not in conflict with any of the dependencies of Kafka Connect.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM