Skip to content

作为一个生产者,如何确定正确的brokerId? #15

@Reasno

Description

@Reasno

看了一下代码,需要手动指定brokerId,如果不指定,就随机分配。可是随机分配如果不是对应分区的leader,就会报出错误[6] For requests intended only for the leader, this error indicates that the broker is not the current leader. For requests intended for any replica, this error indicates that the broker is not a replica of the topic partition.

是需要用户根据meta、topic和partition自己计算正确的brokerId吗?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions