UladzislauBlok opened a new pull request, #19967:
URL: https://github.com/apache/kafka/pull/19967

   Work in progress. Doc and test are on my list
   
   Create listener for config updates. Now we could react on config updates in 
impls of GroupConfigListener (e.g. StreamsRebalanceConfigListener) and take 
concrete actions, e.g. set triggerRebalance flag to true and check it in client 
(GroupMetadataManager) to trigger rebalance.
   
   I've tried to keep GroupConfigListener generic and I found three potential 
types of action implementations could do: 
   1. Set flag (mark something) and wait until client check that and takes an 
action (current case)
   2. Listener takes an actions on it's own 
   3. State of listener was not changed, it's like opposite action (or let's 
say lack of action) for case 1
   To create generic return type for all three cases I chose an enum as return 
type, so we can describe all the cases, e.g. of future state:
   ```
   public enum ConfigUpdateEvent {
       // Client Actions Required
       REBALANCE_REQUIRED,
   
       // Actions were taken by listener
       ERROR_LOGGED... or something
   
       // Statuses where no further action is needed by client or observer
       UNCHANGED;
   }
   ```


-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to