Skip to content

Instantly share code, notes, and snippets.

@rfaita
Created July 29, 2020 15:37
Show Gist options
  • Save rfaita/8bbf69a99883cbd4133eba66bfe3c203 to your computer and use it in GitHub Desktop.
Save rfaita/8bbf69a99883cbd4133eba66bfe3c203 to your computer and use it in GitHub Desktop.
application.yml
spring:
cloud:
stream:
bindings:
topic1:
destination: topic1
contentType: application/json
group: process
binder: eventhub1
consumer:
maxAttempts: 3
topic2:
destination: topic2
contentType: application/json
group: process
binder: eventhub2
consumer:
maxAttempts: 3
binders:
eventhub1:
type: kafka
defaultCandidate: false
environment:
spring:
kafka:
bootstrap-servers: xxx1.servicebus.windows.net:9093
properties:
sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="Endpoint=sb://xxx1.servicebus.windows.net/;SharedAccessKeyName=<yourrolehere>;SharedAccessKey=<yourkeyhere>";
sasl.mechanism: PLAIN
security.protocol: SASL_SSL
eventhub2:
type: kafka
defaultCandidate: false
environment:
spring:
kafka:
bootstrap-servers: xxx2.servicebus.windows.net:9093
properties:
sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username="$ConnectionString" password="Endpoint=sb://xxx2.servicebus.windows.net/;SharedAccessKeyName=<yourrolehere>;SharedAccessKey=<yourkeyhere>";
sasl.mechanism: PLAIN
security.protocol: SASL_SSL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment