[Bug] maxUserPropertySize = 0 (documented as "no limit") rejects every message with a tag, key or user property
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 20/100
Direzione di ricerca
The user-property check is in SendMessageActivity in the proxy module, and the limit comes from ProxyConfig.maxUserPropertySize. Compare it with the guards above it for message body and group size, which return early when the limit is not positive. Done means a non-positive limit skips the check, and a test covers a tagged message with the limit set to 0. Pull request #11388 already addresses this, so check it before starting.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Before Creating the Bug Report
- I found a bug, not just asking a question, which should be created in GitHub Discussions.
- I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
- I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
OS: any (proxy module, gRPC v2 producer path)
RocketMQ version
branch: develop
Git commit id: 9ea2ccdc2b41445aee5e177e14e501d606f5a1ed (the files are unchanged on develop@b76420599)
JDK Version
Compiler: Temurin 1.8.0_504 (target 1.8, same as CI)
Describe the Bug
Setting maxUserPropertySize to the documented "no limit" value rejects every message that carries a tag, a key or a user property.
ProxyConfig documents the option as:
/**
* max user property size, 0 or negative number means no limit for proxy
*/
private int maxUserPropertySize = 16 * 1024;
and the other size limits in SendMessageActivity all honour that convention:
int max = ConfigurationManager.getProxyConfig().getMaxMessageSize();
if (max <= 0) { return; } // message body
int maxSize = ...getMaxMessageGroupSize(); if (maxSize <= 0) { return; } // message group
long maxDelay = ...getMaxDelayTimeMills(); if (maxDelay <= 0) { return; } // delay time
long maxTransactionRecoverySecond = ...; if (maxTransactionRecoverySecond <= 0) { return; }
but the user-property check has no such guard:
if (userPropertySize > config.getMaxUserPropertySize()) {
throw new GrpcProxyException(Code.MESSAGE_PROPERTIES_TOO_LARGE, "the total size of user property is too large, max is " + ...);
}
userPropertySize counts the user properties, the tag and the keys, so it is greater than 0 for any message that uses them —
and with maxUserPropertySize = 0 (or negative, i.e. the documented "no limit") every such send fails with
MESSAGE_PROPERTIES_TOO_LARGE. The documented way of disabling the limit therefore bricks those sends instead of lifting
the check.
Steps to Reproduce
- Set
maxUserPropertySize: 0inrmq-proxy.json(documented meaning: no limit). - Send a message with a tag or a user property through a gRPC client.
- The broker answers
MESSAGE_PROPERTIES_TOO_LARGE("the total size of user property is too large, max is 0").
Expected behavior
A non-positive maxUserPropertySize disables the check, exactly like the other size limits of the same activity.
Actual behavior
Every message that carries a tag, a key or a user property is rejected.
Additional context
Fix: run the comparison only when the configured limit is positive.
- Lingua principale
- Java
- Stelle
- 22.7k
- Fork
- 12k
- Merge medio
- 4g 20h
- PR unite (30g)
- 11
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/rocketmq
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationForse già presa @amalsaidov l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
CompressionType.of fails under the Turkish localeForse già presa @sharanggupta l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
[rocketmq-client-python] TransactionMQProducer allocates an unused producer during initializationAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] notifyMasterOnline aborts the long-polling wake-up with a NullPointerException when an arrival drains a bucket firstForse già presa @iloveeyjafjalla l’ha presa 29 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
apache/rocketmq#11441 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Enhancement] FilterFactory duplicate-registration and unregister semantics lack testsForse già presa @chennaji9 l’ha presa 34 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
apache/rocketmq#11340 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/rocketmq
Issue simili
-
bug emitter:client:csharp
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
microsoft/typespec#12572 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
needs-area-label
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni
-
area/ai area/backend component/zeebe kind/task
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
spAnser/reacharound#38 ·