RobertIndie opened a new pull request, #23223:
URL: https://github.com/apache/pulsar/pull/23223

   PIP: https://github.com/apache/pulsar/pull/23075
   
   ### Motivation
   
   This is the implementation for the PIP: 
https://github.com/apache/pulsar/pull/23075
   Currently, the lookup process uses only the topic name as its parameter. 
However, to enhance this process, it's
   beneficial for clients to provide additional information. This could be done 
by introducing the `lookupProperties` field
   in the client configuration. Clients can then share these properties with 
the broker during lookup.
   
   On the broker side, the broker could also contain some properties that are 
used for the lookup. We can also support the
   lookupProperties for the broker. The broker can use these properties to make 
a better decision on which broker to
   return.
   
   Here is the rack-aware lookup scenario for using the client properties for 
the lookup:
   Assuming there are two brokers that broker-0 configures the lookup property 
"rack" with "A" and broker-1 configures the
   lookup property "rack" with "B". By using the lookup properties, clients can 
supply rack information during the lookup,
   enabling the broker to identify and connect them to the nearest broker 
within the same rack. If a client that configures
   the "rack" property with "A" connects to a lookup broker, the customized 
load manager can determine broker-0 as the
   owner broker since the broker and the client have the same rack property.
   
   ### Modifications
   
   - Add new configuration `lookupProperties` to the client. While looking up 
the broker, the client will send the properties
   to the broker through `CommandLookupTopic` request.
   - Add `properties` field to the `CommandLookupTopic`.
   - Add `lookupProperties` to the `LookupOptions`. The Load Manager 
implementation can access
   the `properties` through `LookupOptions` to make a better decision on which 
broker to return.
   - Introduce a new broker configuration `lookupPropertyPrefix`. Any broker 
configuration properties that start with the `lookupPropertyPrefix`
   will be included into the `BrokerLookupData` and be persisted in the 
metadata store. The broker can use these properties
   during the lookup.
   
   
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   *(Please pick either of the following options)*
   
   This change is a trivial rework / code cleanup without any test coverage.
   
   *(or)*
   
   This change is already covered by existing tests, such as *(please describe 
tests)*.
   
   *(or)*
   
   This change added tests and can be verified as follows:
   
   *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads 
(10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Does this pull request potentially affect one of the following parts:
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   *If the box was checked, please highlight the changes*
   
   - [ ] Dependencies (add or upgrade a dependency)
   - [ ] The public API
   - [ ] The schema
   - [ ] The default values of configurations
   - [ ] The threading model
   - [ ] The binary protocol
   - [ ] The REST endpoints
   - [ ] The admin CLI options
   - [ ] The metrics
   - [ ] Anything that affects deployment
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions 
will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since 
the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed 
in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments 
have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to