Skip to content
Spring Boot 2.0 for Kafka demo
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src first commit Apr 24, 2018
README.md add description Apr 24, 2018
pom.xml first commit Apr 24, 2018

README.md

SpringBoot demo for Kafka

对于Kafka Producer和Consumer都需要以下几个配置:

相关文件 参数
kafka_client_jaas.conf AccessKey 阿里云账号的AccessKey
kafka_client_jaas.conf SecretKey 阿里云账号的SecretKey
producer/consumer.xml ssl.truststore.location {XXX,自己的路径}/kafka.client.truststore.jks
producer/consumer.xml group.id 请修改为AliwareMQ控制台上申请的ConsumerID
producer/consumer.xml defaultTopic 请修改为AliwareMQ控制台上申请的Topic(类型为Kafka消息)

KafkaSaslConfig类可以不用,用来替代的是加入JVM启动参数

-Djava.security.auth.login.config=/home/admin/kafka_client_jaas.conf
You can’t perform that action at this time.