问题
Beginner in kafka and confluent package.I want to start multiple brokers so as to consume the topic.
It can be done via this setting -
{'bootstrap.server' : 'ip:your_host,...',}
This setting can be defined in the server config file or else in the script as well.
But how shall I run those?. If I just add multiple end points to the bootstrap servers, it gives this error:
java.lang.IllegalArgumentException: requirement failed: Each listener must have a different name, listeners: PLAINTEXT://:9092, PLAINTEXT://:9093
回答1:
Done. I had actually mentioned same port for producer and consumer and hence was the issue. Set up brokers on different ports and works fine even if one broker goes down.
来源:https://stackoverflow.com/questions/50773941/start-multiple-brokers-in-kafka