Distributed Mode

Running Connect in Distributed Mode

compose/connect.yaml adds a worker l3-connect (apache/kafka:4.3.1 running connect-distributed.sh, REST port 33083), PostgreSQL 1,289 l3-pg with the six-book catalog table and, under Compose profiles, a second worker and kafbat UI. The plugin folder holds the Apache-2.0 Aiven JDBC connector (https://github.com/Aiven-Open/jdbc-connector-for-apache-kafka 113 ) 6.10.0 with its PostgreSQL driver; Confluent 17,245 's JDBC connector uses the Confluent Community License.

compose/connect/worker.properties: the distributed worker's configuration
# worker.properties: one Connect cluster; every worker with this group.id joins it
bootstrap.servers=l3-kafka:9092
group.id=booknest-connect
listeners=http://0.0.0.0:8083
# Advertise this worker by its host name, read from the environment
config.providers=env
config.providers.env.class=org.apache.kafka.common.config.provider.EnvVarConfigProvider
rest.advertised.host.name=${env:HOSTNAME}
plugin.path=/connect/plugins
config.storage.topic=_connect-configs
offset.storage.topic=_connect-offsets
status.storage.topic=_connect-status
config.storage.replication.factor=1
offset.storage.replication.factor=1
status.storage.replication.factor=1
key.converter=org.apache.kafka.connect.storage.StringConverter
value.converter=org.apache.kafka.connect.json.JsonConverter
value.converter.schemas.enable=false

Workers forward some REST calls to the leader, so each advertises its own host name; by default they all advertised 0.0.0.0:8083. Production storage topics need replication 3. Once docker compose -f compose/connect.yaml up -d --wait returns, GET / on port 33083 reports version 4.3.1 and the Kafka 129 cluster ID, and GET /connector-plugins lists the two JDBC connectors, the FileStream pair and MirrorMaker 2's three connectors (Choosing and Migrating).

The REST API is the only management interface: PUT .../config creates or updates, PATCH changes some keys, GET .../status reports, PUT .../stop and .../resume control work, and .../offsets resets a stopped connector. Keep configs in Git 1,932 and apply them with the idempotent PUT.