wang-jiahua opened a new pull request, #10536: URL: https://github.com/apache/rocketmq/pull/10536
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. --> ### Which Issue(s) This PR Fixes Fixes #10534 ### Brief Description Implement `FastCodesHeader.encode()/decode()` for `PullMessageRequestHeader` and `PullMessageResponseHeader` to eliminate reflection-based header serialization on the pull message hot path. 1. **`PullMessageRequestHeader`** — Fix `decode()` signature from `Map<String, String>` to `HashMap<String, String>`, optimize `encode()` with `writeLong`/`writeInt` for numeric fields. 2. **`PullMessageResponseHeader`** — Fix `decode()` signature, optimize `encode()` for 4 response fields. ### How Did You Test This Change? 1. **Compilation**: `remoting` module compiles cleanly on JDK 21. 2. **Commercial compatibility**: No commercial classes extend `PullMessageRequestHeader` or `PullMessageResponseHeader`. 3. **Microbenchmark** (R1 encode/decode bench): `writeIfNotNull` + `writeDecimalInt` is 25% faster than `value.toString()` + `writeStr` for encoding; `readStr` with single-byte cache is 56% faster for decoding. -- 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]
