Skip to content

Conversation

@Yashwanth-NS-07
Copy link

Problem

Explained in issue #1567

Root Cause Analysis

The issue appears to be that kafka-connect-jdbc is missing the required ServiceLoader configuration files.

For ServiceLoader to discover connector implementations, the JAR needs to contain:

  • META-INF/services/org.apache.kafka.connect.source.SourceConnector
  • META-INF/services/org.apache.kafka.connect.sink.SinkConnector

These files should list the fully qualified class names of the connector implementations.

Proposed Solution

Add ServiceLoader configuration files to the kafka-connect-jdbc JAR:

1. Create Source Connector Service File

File: META-INF/services/org.apache.kafka.connect.source.SourceConnector

io.confluent.connect.jdbc.JdbcSourceConnector

2. Create Sink Connector Service File

File: META-INF/services/org.apache.kafka.connect.sink.SinkConnector

io.confluent.connect.jdbc.JdbcSinkConnector
Does this solution apply anywhere else?

: yes

If yes, where?

here: https://github.com/apache/kafka/tree/trunk/connect/file/src/main/resources/META-INF/services

Test Strategy

Manual Testing Performed

I manually tested this change by spinning up Kafka brokers and Connect servers locally.

Test Environment

  • Kafka brokers running locally
  • Kafka Connect server in distributed mode
  • Configuration: plugin.discovery=service_load

Test Steps

  1. Started local Kafka brokers
  2. Configured Kafka Connect with plugin.discovery=service_load
  3. Added kafka-connect-jdbc JAR with ServiceLoader configuration
  4. Started Kafka Connect server
  5. Verified connector discovery via REST API:
   curl http://localhost:8083/connector-plugins

Release Plan

Proposed Approach

  • Merge to master branch for next release
  • Consider backporting to active maintenance branches (if applicable)

Compatibility

  • ✅ Backward compatible - no breaking changes
  • ✅ Safe to merge - only adds new functionality
  • ✅ No rollback concerns - existing discovery modes unaffected

Suggested Target

  • Next minor/patch release

- Add META-INF/services/org.apache.kafka.connect.source.SourceConnector
- Add META-INF/services/org.apache.kafka.connect.sink.SinkConnector
- Enable connector discovery with service_load mode

Fixes confluentinc#1567
@Yashwanth-NS-07 Yashwanth-NS-07 requested a review from a team as a code owner October 5, 2025 19:48
@confluent-cla-assistant
Copy link

confluent-cla-assistant bot commented Oct 5, 2025

🎉 All Contributor License Agreements have been signed. Ready to merge.
✅ Yashwanth-NS-07
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant