pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[improve][broker][WIP] Add brokerId to lookup results and load manager data

Open lhotari opened this issue 1 year ago • 0 comments

WIP: This PR most likely requires a PIP and that will follow.

Motivation

In the past brokers didn't have a stable unique identifier. In PR #21894, the "lookupServiceAddress" was renamed to be "brokerId" so that there would be a single unique identifier for a broker in a cluster.

This PR continues making brokerId a first class identifier for a broker. The long term benefit is having consistency across the APIs. One reason to add this information to the topic lookup result is to be able to use the APIs in a way where you lookup a topic and receive that broker id. With this broker id, you could then lookup more details about the broker in the Admin API with the broker id.

Modifications

  • add brokerId to lookup results
  • add brokerId to load manager data
    • brokerId already was contained in LoadReport with the field name name instead of brokerId. Keep the name name for backwards compatibility
  • add client test to ensure that lookup result includes the broker id for both binary and http lookup results

Documentation

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

lhotari avatar May 03 '24 17:05 lhotari