[Bug] maxUserPropertySize = 0 (documented as "no limit") rejects every message with a tag, key or user property
Los mantenedores suelen responder en 1 día
@iloveeyjafjalla ya está trabajando en esto.
Desde el 13/10/2026.
- #11388 de @iloveeyjafjalla — abierto
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 20/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Java
- Estrellas
- 22.7k
- Forks
- 12k
- Merge medio
- 4 d 20 h
- PR fusionados (30 d)
- 11
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/rocketmq
-
[Bug] RemotingHelper.connect swaps the socket send and receive buffer configurationPosiblemente ocupada @amalsaidov la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
CompressionType.of fails under the Turkish localePosiblemente ocupada @sharanggupta la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día
-
[rocketmq-client-python] TransactionMQProducer allocates an unused producer during initializationAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
[Bug] notifyMasterOnline aborts the long-polling wake-up with a NullPointerException when an arrival drains a bucket firstPosiblemente ocupada @iloveeyjafjalla la tomó hace 29 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
apache/rocketmq#11441 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Enhancement] FilterFactory duplicate-registration and unregister semantics lack testsPosiblemente ocupada @chennaji9 la tomó hace 34 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
apache/rocketmq#11340 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de apache/rocketmq
Issues similares
-
bug emitter:client:csharp
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoft/typespec#12572 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
-
needs-area-label
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
area/ai area/backend component/zeebe kind/task
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
spAnser/reacharound#38 ·