问题
I'm bit confused with kafka ACL configuration, where we configure authorization for producer and consumer. There are various examples showing producing/consuming message using command line. Do we need any extra configuration to produce/consume messages using JAVA api to/from secured kafka topic.
回答1:
@Apollo : This question is quite vague.. If you want to learn ACL/ SSL it will take some time.. the below link might help you to get started. https://github.com/Symantec/kafka-security-0.9
回答2:
If you would like to learn about the details of configuration for a secured Kafka server, Confluent docs has an excellent description. You can notice in the docs that you set certain properties through a file client.properties, which shall be used as a config file for the console producer and consumer. Similarly in the case of Java consumer/producer, you can set these properties as described in the examples here.
来源:https://stackoverflow.com/questions/37835199/kafka-java-producer-and-consumer-with-acl-enabled-with-topic