spring.cloud.stream:
  function.definition: supply;receive;consume
  bindings:
    supply-out-0:
      destination: foo
      binder: kafka1
    receive-in-0:
      destination: foo
      binder: kafka1
    receive-out-0:
      destination: bar
      binder: kafka2
    consume-in-0:
      destination: bar
      binder: kafka2
  binders:
    kafka1:
      type: kafka
      environment:
         spring:
           cloud:
             stream:
              kafka:
                binder:
                  brokers: localhost:9092
                  configuration.sasl.jaas.config: "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"admin\" password=\"admin-secret\";"
                # The following properties should not be used if you have separate authorization contexts for the two clusters.
                # Only use them if they are identical (in which case, you don't need the above property - sasl.jaas.config.
#                binder.jaas.loginModule: org.apache.kafka.common.security.plain.PlainLoginModule
#                binder.jaas.options.username: admin
#                binder.jaas.options.password: admin-secret
    kafka2:
      type: kafka
      environment:
        spring:
          cloud:
            stream:
              kafka:
                binder:
                  brokers: localhost:9093
                  configuration.sasl.jaas.config: "org.apache.kafka.common.security.plain.PlainLoginModule required username=\"foo\" password=\"foo-secret\";"
                  # The following properties should not be used if you have separate authorization contexts for the two clusters.
                  # Only use them if they are identical (in which case, you don't need the above property - sasl.jaas.config.
#                  jaas.loginModule: org.apache.kafka.common.security.plain.PlainLoginModule
#                  jaas.options.username: foo
#                  jaas.options.password: foo-secret
  kafka.binder:
    configuration:
      security.protocol: SASL_PLAINTEXT
      sasl.mechanism: PLAIN