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

   **Issue Evaluation**
   
   Category: `type/enhancement` | Status: **Evaluated**
   
   **Feasibility:** Feasible
   **Scope:** `remoting` module — `PullMessageRequestHeader`, 
`PullMessageResponseHeader`
   **Dependency:** R1 (#10522) via PR #10524 — ✅ Merged
   
   **Assessment:**
   - Both classes already implement `FastCodesHeader` with 
`encode()`/`decode()` methods.
   - Current `encode()` uses `writeIfNotNull()` which converts all numeric 
fields (`Long`/`Integer`) to `String` via `toString()`, causing per-call 
allocation.
   - With R1 merged, `writeLong`/`writeInt` helpers are now available in 
`FastCodesHeader`, enabling direct primitive writes without String boxing.
   - `PullMessageRequestHeader` has ~15 fields (several Long/Integer), 
`PullMessageResponseHeader` has ~4 Long fields — meaningful allocation 
reduction at scale.
   
   **Minor note:** The issue mentions `decode()` uses `Map<String, String>` vs 
`HashMap<String, String>` — current code on develop already uses 
`HashMap<String, String>` matching the interface signature. May have already 
been addressed or was a misreading.
   
   This is a well-scoped optimization following the established pattern from R1.
   
   ---
   *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