Full video: https://www.youtube.com/watch?v=HWhq737A1Z8
Configuration file:
security.protocol=SASL_SSL
sasl.mechanisms=PLAIN
sasl.username=$ConnectionString
sasl.password=Endpoint=sb://<namespace>.servicebus.windows.net/;SharedAccessKeyName=<Key name>;SharedAccessKey=<Access key>
To set the default configuration file:
export KAFKACAT_CONFIG=<full path to config file>
bootstrap.servers=<namespace>.servicebus.windows.net:9093
security.protocol=SASL_SSL
sasl.mechanism=PLAIN
sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="Endpoint=sb://<namespace>.servicebus.windows.net/;SharedAccessKeyName=<Key name>;SharedAccessKey=<Access key>";
Specify the configuration file using --producer.config or --consumer.config properties
- Create jaas.conf file:
KafkaClient {
org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="Endpoint=sb://<namespace>.servicebus.windows.net/;SharedAccessKeyName=<Key name>;SharedAccessKey=<Access key>";
};
- Specify it in /instance//conf/dmts64.vmargs file:
-Djava.security.auth.login.config=<full path to jaas.conf>
- Modify /instance//conf/kafkaproducer.properties file and add:
metadata.broker.list=<namespace>.servicebus.windows.net:9093
security.protocol=SASL_SSL
sasl.mechanisms=PLAIN
- Modify /instance//conf/kafkaconsumer.properties file and add:
metadata.broker.list=<namespace>.servicebus.windows.net:9093
security.protocol=SASL_SSL
sasl.mechanisms=PLAIN
Restart the instance if it's running.