Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Add nodeId to DescribeFeaturesOptions. Default value is -1empty.

Code Block
languagejava
linenumberstrue
public class DescribeFeaturesOptions extends AbstractOptions<DescribeFeaturesOptions> {
    private intOptional<Integer> nodeId = -1Optional.empty();

    /**
     * Set the node id to which the request should be sent. If using bootstrap controller and node id is less than 0,
     * the request will be sent to the controller node. If using bootstrap broker and node id is less than 0, the
     * request will be sent to the first available node.
     */
    public DescribeFeaturesOptions nodeId(int nodeId) {
        this.nodeId = Optional.of(nodeId;
        return this;
    }

    /**
     * The node id to which the request should be sent. If using bootstrap controller and node id is less than 0empty,
     * the request will be sent to the controller node. If using bootstrap broker and node id is less than 0empty, the
     * request will be sent to the first available node.
     */
    public intOptional<Integer> nodeId() {
        return nodeId;
    }
}

...

  • Default DescribeFeaturesOptions can work as usual.

  • If nodeId is negativeempty, the Admin client ignores it and falls back to use LeastLoadedBrokerOrActiveKController.

...