|
|
|
@ -48,6 +48,7 @@ public class KafkaUtil {
|
|
|
|
|
properties.setProperty("key.deserializer", StringDeserializer.class.getName());
|
|
|
|
|
properties.setProperty("value.deserializer", StringDeserializer.class.getName());
|
|
|
|
|
if (StringUtils.isNotBlank(appCode)) {
|
|
|
|
|
System.out.println("使用鉴权");
|
|
|
|
|
properties.setProperty("bootstrap.servers", "10.0.10.153:29553,10.0.10.153:29554");
|
|
|
|
|
properties.setProperty("sasl.jaas.config", "org.apache.kafka.common.security.scram.ScramLoginModule required username=\"dwVendor\" password=\"fEVcb^QFB;IN$K5\";");
|
|
|
|
|
properties.setProperty("sasl.mechanism", "SCRAM-SHA-512");
|
|
|
|
|