Browse Source

修改kafka配置

Jacky Wong 4 years ago
parent
commit
8015eaf365
1 changed files with 9 additions and 1 deletions
  1. 9 1
      search-web/src/main/resources/application.yml

+ 9 - 1
search-web/src/main/resources/application.yml

@@ -14,16 +14,24 @@ spring:
       properties:
         # 信任的可以序列化的包
         spring.json.trusted.packages: com.liangjian.search.kafka
+        # 安全方式
+        sasl.mechanism: PLAIN
+        security.protocol: SASL_PLAINTEXT
+        sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="mooc" password="360lj2019!@#";
     consumer:
       value-deserializer: org.springframework.kafka.support.serializer.JsonDeserializer
       enable-auto-commit: false
       properties:
         # 信任的可以序列化的包
         spring.json.trusted.packages: com.liangjian.search.kafka
+        # 安全方式
+        sasl.mechanism: PLAIN
+        security.protocol: SASL_PLAINTEXT
+        sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="mooc" password="360lj2019!@#";
     listener:
       concurrency: 9
       ack-mode: manual_immediate
-    bootstrap-servers: "192.168.50.34:9092"
+    bootstrap-servers: "139.159.192.185:9092"
 
   http:
     encoding: