[Bug] QueryMessage ignores the request's pagination fields and echoes a scroll_id it never issues
Los mantenedores suelen responder en 1 día
@iloveeyjafjalla ya está trabajando en esto.
Desde el 12/10/2026.
- #11370 de @iloveeyjafjalla — abierto
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
Línea de trabajo
Read the QueryMessage implementation and the ListMessageRequest and ListMessageResponse proto fields cited in the issue, then check §8 in docs/proxy-admin.md and docs/proxy-admin-zh.md. Reproduce with page_size: 1 and a second-page request. Done means the supported page-size cap is honored, unsupported page numbers and scroll IDs return BAD_REQUEST without echoing a cursor, and both docs describe the boundary.
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, admin gRPC surface)
RocketMQ version
branch: develop
Git commit id: 9ea2ccdc2b41445aee5e177e14e501d606f5a1ed (2026-10-08)
JDK Version
Compiler: Temurin 1.8.0_504 (target 1.8, same as CI)
Describe the Bug
QueryMessage accepts the request's pagination fields and then ignores them, while answering OK.
The proto declares page-style pagination and a cursor:
// ListMessageRequest
// Page-style pagination parameters.
optional int32 page_num = 8;
optional int32 page_size = 9;
...
// ListMessageResponse
// Cursor to be passed back to fetch the next page.
optional string scroll_id = 3;
The implementation reads none of them: only max_message_nums is honored (defaulting to 32), and the response echoes the
request's scroll_id back:
int maxNums = request.getMaxMessageNums() > 0 ? request.getMaxMessageNums() : DEFAULT_MAX_MESSAGE_NUMS;
...
ListMessageResponse.Builder builder = ListMessageResponse.newBuilder().setStatus(ok());
if (request.hasScrollId()) {
builder.setScrollId(request.getScrollId());
}
Consequences:
- a caller that sets only
page_size = 10receives up to 32 messages (the default cap) instead of its page size; - a caller that asks for
page_num = 2, or that passes thescroll_idfrom the previous response back, receives the same
first page again withOK— there is no ordering or cursor behind it, so a paging client loops on the same data; - the echoed
scroll_idclaims a continuation exists that the proxy never issues.
Steps to Reproduce
- Run a proxy with
grpcAdminServerEnable=trueon a topic with more than one page of messages for a key. - Call
QueryMessage{message_key, page_size:1}— more than one message comes back. - Call it again with
page_num:2(or with thescroll_idof the first response) — the same first page comes back withOK.
Expected behavior
The fields that can be honored are honored (a page_size acts as the result cap), and the ones the open-source broker cannot
serve — page_num beyond the first page and scroll_id, which both need a cursor the broker does not provide — are refused
with an explicit status instead of silently returning an unscoped page. scroll_id is not echoed back as if a cursor existed.
This is the rule the same RPC already applies to its unsupported search_key variants (subscription / lite_topic /
SEARCHKEY_NOT_SET → BAD_REQUEST) and the documented surface rule in docs/proxy-admin.md §8.
Actual behavior
OK with an unscoped first page; page_size ignored; a scroll_id that cannot fetch anything echoed back.
Additional context
Fix: cap the result by page_size when it is set, refuse page_num > 1 and any scroll_id with BAD_REQUEST, and document
the boundary in docs/proxy-admin.md / docs/proxy-admin-zh.md §8.
- Lenguaje dominante
- Java
- Estrellas
- 22.7k
- Forks
- 12k
- Merge medio
- 3 d 18 h
- PR fusionados (30 d)
- 17
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 ·