我正在尝试建立一个由多个使用不同引导程序服务器和ssl证书的使用者组成的micronaut项目。我没有设置全局引导服务器和证书。这是行不通的。任何建议表示赞赏。
另一种选择是将证书合并到一个jks文件中,并设置全局引导程序和ssl配置,但我不确定kafka如何知道要到达哪个服务器的主题。
kafka:
consumers:
group1:
bootstrap:
servers: $someserver1
ssl:
keystore:
location: /keystore.jks
password: password
truststore:
location: /truststore.jks
password: password
type: PKCS12
security:
protocol: ssl
group2:
bootstrap:
servers: $someserver2
ssl:
keystore:
location: /keystore-1.jks
password: password
truststore:
location: /truststore-1.jks
password: password
type: PKCS12
security:
protocol: ssl
上面的配置工作正常,但是您需要禁用kafka健康检查或提供组合的ssl证书,否则micronaut kafka健康检查将失败。 Micronaut的1.2.7版本确实如此。
kafka:
health.enabled: false
consumers:
group1:
bootstrap:
servers: $someserver1
ssl:
keystore:
location: /keystore.jks
password: password
truststore:
location: /truststore.jks
password: password
type: PKCS12
security:
protocol: ssl
group2:
bootstrap:
servers: $someserver2
ssl:
keystore:
location: /keystore-1.jks
password: password
truststore:
location: /truststore-1.jks
password: password
type: PKCS12
security:
protocol: ssl