Reputation: 53
I have two kafka broker. I need to listen to both. How can I add both of them in my application.properties file?
test.kafka.bootstrapservers=Broker1:9092
Upvotes: 3
Views: 8968
Reputation: 191854
If you have a valid Kafka cluster, then bootstrapping against only one will already cause you to consume from both.
Listing multiple bootstrap addresses is primarily for fault tolerance for the client and can be done with a comma-separated list
Upvotes: 2