RockteMQ-AI commented on issue #10643:
URL: https://github.com/apache/rocketmq/issues/10643#issuecomment-5032099134

   **Issue Evaluation**
   
   Category: `type/enhancement` | Status: **Evaluated**
   
   **Feasibility:** Feasible
   **Scope:** `broker` module — `BrokerMetricsConstant`, `BrokerMetricsManager`
   **Compatibility:** No breaking changes
   
   The proposed enhancement is well-scoped and follows existing patterns:
   
   - `BrokerMetricsConstant` already defines `GAUGE_TOPIC_NUM` and 
`GAUGE_CONSUMER_GROUP_NUM` — adding `GAUGE_LMQ_NUM` is a natural extension.
   - `BrokerMetricsManager` registers `ObservableLongGauge` for `topicNum` and 
`consumerGroupNum` using the same pattern proposed here.
   - `getLmqNum()` already exists in `ConsumeQueueStoreInterface` and is used 
in `LiteManagerProcessor` and `HookUtils`, so no new store-layer API is needed.
   
   **Implementation outline:**
   1. Add `GAUGE_LMQ_NUM = "rocketmq_lmq_number"` in `BrokerMetricsConstant`
   2. Add `ObservableLongGauge lmqNum` field in `BrokerMetricsManager`
   3. Register the gauge in `registerMetrics()` reading from 
`messageStore.getQueueStore().getLmqNum()`
   
   This is a low-risk, self-contained change. A PR would be welcome.
   
   ---
   *Automated evaluation by RockteMQ-AI*


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