sharanggupta opened a new issue, #11512:
URL: https://github.com/apache/rocketmq/issues/11512
**Describe the bug**
`CompressionType.of(String)` normalises the name with
`name.trim().toUpperCase()` (no Locale). Under the Turkish locale (tr-TR, also
az), a lower/mixed-case value containing `i` folds to the dotted capital `İ`,
so `"zlib".toUpperCase()` -> `"ZLİB"`, which does not match `case "ZLIB"` and
falls through to `throw new RuntimeException("Unsupported compress type name:
...")`.
**Impact**
A producer JVM under a Turkish default locale throws when the compression
type is given in lower/mixed case, e.g. `-Drocketmq.message.compressType=zlib`
(DefaultMQProducer reads `rocketmq.message.compressType`) or the benchmark `-ct
zlib`. The uppercase form `ZLIB` (the default) is unaffected, so this only hits
configs relying on the documented case-insensitive parsing.
**Version:** 5.5.1 and current `develop`.
**Fix:** `toUpperCase(Locale.ROOT)` — the keyword set is ASCII. One-line fix
+ regression test ready; happy to open a PR.
Sibling instances of the same root cause exist in the common module
(`TopicMessageType.getMetricsValue()` metric labels; OS-name checks in
`NetworkUtil`/`MixAll`) — can address in a follow-up if wanted.
--
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]