I run the docker-compose.yml.There is a kafka connect debezium/connect image and I added the jar: brave-kafka-interceptor-0.6.0.jar to the path plugin. As you can see below the brave-kafka-interceptor-0.6.0.jar plugin was loaded by the jvm. But when we deploy the kafka-connect debezium connector the connector gives me a class not found error. Having worked on a similar subject would you have any possible resolutions?
The docker compose is:
version: '3.8'
services:
kafka-1:
image: debezium/kafka:2.4
container_name: kafka-1
ports:
- 9092:9092
environment:
- CLUSTER_ID=ZGRkZDM1YTA1MzQwNGQyYT
- BROKER_ID=1
- KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka-1:9092,2@kafka-2:9093,3@kafka-3:9094
- KAFKA_LISTENERS=INTERNAL://:29092,EXTERNAL://:39092,CONTROLLER://kafka-1:9092
- KAFKA_ADVERTISED_LISTENERS=INTERNAL://kafka-1:29092,EXTERNAL://localhost:39092
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT
- KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
kafka-2:
image: debezium/kafka:2.4
container_name: kafka-2
ports:
- 9093:9093
environment:
- CLUSTER_ID=ZGRkZDM1YTA1MzQwNGQyYT
- BROKER_ID=2
- KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka-1:9092,2@kafka-2:9093,3@kafka-3:9094
- KAFKA_LISTENERS=INTERNAL://:29093,EXTERNAL://:39093,CONTROLLER://kafka-2:9093
- KAFKA_ADVERTISED_LISTENERS=INTERNAL://kafka-2:29093,EXTERNAL://localhost:39093
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT
- KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
kafka-3:
image: debezium/kafka:2.4
container_name: kafka-3
ports:
- 9094:9094
environment:
- CLUSTER_ID=ZGRkZDM1YTA1MzQwNGQyYT
- BROKER_ID=3
- KAFKA_CONTROLLER_QUORUM_VOTERS=1@kafka-1:9092,2@kafka-2:9093,3@kafka-3:9094
- KAFKA_LISTENERS=INTERNAL://:29094,EXTERNAL://:39094,CONTROLLER://kafka-3:9094
- KAFKA_ADVERTISED_LISTENERS=INTERNAL://kafka-3:29094,EXTERNAL://localhost:39094
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT
- KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL
kconnect:
image: debezium/connect:2.5
container_name: kconnect
ports:
- 8083:8083
- 9012:9012
environment:
CONFIG_STORAGE_TOPIC: my_connect_configs
OFFSET_STORAGE_TOPIC: my_connect_offsets
STATUS_STORAGE_TOPIC: my_connect_statuses
BOOTSTRAP_SERVERS: kafka-1:29092,kafka-2:29093,kafka-3:29094
KAFKA_CONNECT_PLUGINS_DIR: /kafka/connect, /kafka/others_connectors
CONNECT_PRODUCER_INTERCEPTOR_CLASSES: brave.kafka.interceptor.TracingProducerInterceptor
CONNECT_CONSUMER_INTERCEPTOR_CLASSES: brave.kafka.interceptor.TracingConsumerInterceptor
CONNECT_CONNECTOR_CLIENT_CONFIG_OVERRIDE_POLICY: All
CONNECT_PRODUCER_ZIPKIN_SENDER_TYPE: KAFKA
CONNECT_PRODUCER_ZIPKIN_SENDER_NAME: HTTP
CONNECT_PRODUCER_ZIPKIN_BOOTSTRAP_SERVERS: kafka-1:29092,kafka-2:29093,kafka-3:29094
KAFKA_OPTS: "-verbose:class"
KAFKA_CONNECT_LOG4J_LOGGERS: "org.apache.kafka.connect.runtime.rest.connector"
KAFKA_CONNECT_LOG4J_ROOT_LOGLEVEL: "DEBUG"
depends_on:
- kafka-1
- kafka-2
- kafka-3
volumes:
- ./libs/brave-kafka-interceptor-0.6.0-SNAPSHOT.jar:/kafka/others_connectors/brave-kafka-interceptor-0.6.0.jar
- ./confluentinc-kafka-connect-jdbc-10.7.4/lib:/kafka/others_connectors/jdbc
db:
container_name: db
image: postgres:16.1-alpine3.19
restart: always
environment:
- POSTGRES_USER=postgres # Le user pour se connecter à postgres
- POSTGRES_PASSWORD=postgres # Le password pour se connecter à postgres
ports:
- '5432:5432'
volumes:
- ./postgres_data:/var/lib/postgresql/data # Répertoire où seront stocké les données postgres
- ./db/init.sql:/docker-entrypoint-initdb.d/create_tables.sql # Le script pour préparer la base de données destinée à notre exemple.
command: [ "postgres", "-c", "wal_level=logical" ] #Le wal_level doit être "logical" pour faire fonctionner le connecteur postgres debezium.
pgadmin:
image: dpage/pgadmin4:8.1
container_name: pgadmin
restart: always
ports:
- "8888:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected] # The PostgreSQL user (useful to connect to the database)
PGADMIN_DEFAULT_PASSWORD: postgres # The PostgreSQL password (useful to connect to the database)
#openzipkin/zipkin
zipkin:
image: openzipkin/zipkin
container_name: zipkin
environment:
STORAGE_TYPE: mem
KAFKA_BOOTSTRAP_SERVERS: kafka-1:29092,kafka-2:29093,kafka-3:29094
ports:
- 9411:9411
Thks,