f1amingo opened a new issue, #10622:
URL: https://github.com/apache/rocketmq/issues/10622

   ### Before Creating the Enhancement Request
   - [x] I have confirmed this should be classified as an enhancement.
   
   ### Summary
   LiteEventDispatcher currently caches `ConsumerOffsetManager` as a final 
field at construction time. Projects that build on top of this core may replace 
the `ConsumerOffsetManager` implementation at the upper level. In that case, 
the dispatcher still holds the original reference and keeps querying offsets 
from the obsolete instance, so the customized manager never takes effect.
   
   ### Motivation
   Resolving the manager lazily via 
`brokerController.getConsumerOffsetManager()` instead of caching it in a field 
allows downstream projects to swap in their own `ConsumerOffsetManager` 
implementation after the broker is fully initialized, without being stuck with 
the stale reference.
   
   ### Describe the Solution You'd Like
   - Remove the cached `consumerOffsetManager` field from `LiteEventDispatcher`.
   - Replace all usages with `brokerController.getConsumerOffsetManager()` so 
the manager is resolved dynamically on each call.
   
   ### Describe Alternatives You've Considered
   None. This is a straightforward, minimal change with zero risk to the hot 
path since offset queries are not latency-critical.
   
   ### Additional Context
   N/A


-- 
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