-
-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
消费者端无法连接到kafka,连接地址被固定 #1689
Comments
const kafka: Kafka = new Kafka({ |
问题在于我使用ip也是这样,返回的日志任然是"kafka:9092",而不是我配置的地址 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我在使用kafkajs写一个demo时发现了无法连接的情况,根据我对日志的排查,发现broker固定连接一个名为“kafka:9092”的地址,而不是我在实例化kafkajs时设定的主机地址,这就导致我无法连接到正确的服务器,我通过在计算机的hosts文件中添加
192.168.21.11 kafka
解决了这个问题,但是我还是希望你们能修复这个问题。我的项目依赖:
出现问题时的日志:
我的代码
The text was updated successfully, but these errors were encountered: