- Newest
- Most votes
- Most comments
To connect your MSK Connector to an external Confluent Kafka cluster that uses SASL_SSL authentication, you need to understand the difference between worker configuration properties and connector configuration properties.
The documentation you referenced is correct that worker configuration properties with the "sasl" prefix are not supported directly in the worker configuration. However, this doesn't mean you can't connect to a SASL-authenticated Kafka cluster. Instead, you need to provide these authentication details in the connector configuration itself.
For your MSK Connector configuration, you should include the authentication details as part of your connector configuration JSON, not in the worker properties section. Your connector configuration should include something like:
{ "connector.class": "your.connector.class", "tasks.max": "1", "topics": "your-topic", "key.converter": "org.apache.kafka.connect.storage.StringConverter", "value.converter": "org.apache.kafka.connect.json.JsonConverter", "value.converter.schemas.enable": "false", "consumer.security.protocol": "SASL_SSL", "consumer.sasl.mechanism": "PLAIN", "consumer.sasl.jaas.config": "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"your-username\" password=\"your-password\";", "consumer.bootstrap.servers": "your-kafka-bootstrap-servers" }
Note that the authentication properties are prefixed with "consumer." to indicate they apply to the consumer client used by the connector.
When migrating a sink connector from a self-managed environment to MSK Connect, you need to:
- Get the connector configuration from your existing setup
- Create a new MSK Connector with the same name
- Use the appropriate custom plugin for your connector type
- Include the authentication details in the connector configuration
- Verify the connector is working by checking the logs once it's active
Since Kafka Connect sink connectors use the Kafka group membership API and store offsets in the same __consumer_offset
topics as typical consumer applications, the migration should be relatively straightforward once you've properly configured the authentication.
Sources
Migrate sink connectors to Amazon MSK Connect - Amazon Managed Streaming for Apache Kafka
Migrate source connectors to Amazon MSK Connect - Amazon Managed Streaming for Apache Kafka
Relevant content
- asked 2 years ago
- asked a year ago
It still fails, and in logs I can see
2025-06-10T13:38:08.000Z [Worker-0a7fd0156af60afa7] sasl.mechanism = GSSAPI