[Bug] PopLiteMessageProcessor preCheck drops the consumer identity from the parentTopic-not-exist error log

Aperta
#11,435 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@messere1 ci sta già lavorando.

Dal 14/10/2026.

  • #11436 di @messere1 — aperta

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
java
Ambito
backend

Direzione di ricerca

The bug is in the preCheck method of PopLiteMessageProcessor, in the branch that logs 'The parentTopic {} not exist, consumer: {}' when selectTopicConfig returns null. The log call passes only the topic, so the consumer group from requestHeader.getConsumerGroup() needs to be added as the second argument. A test in PopLiteMessageProcessorTest should capture the log event and confirm the group name appears. A pull request (#11436) is already open against this issue, 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

Any.

RocketMQ version

develop branch (dc70260b7)

JDK Version

Any.

Describe the Bug

PopLiteMessageProcessor#preCheck reserves a log slot for the consumer when the parent topic of a lite pop request does not exist, but never passes the argument:

TopicConfig topicConfig = brokerController.getTopicConfigManager().selectTopicConfig(requestHeader.getTopic());
if (null == topicConfig) {
    LOGGER.error("The parentTopic {} not exist, consumer: {} ", requestHeader.getTopic());
    response.setCode(ResponseCode.TOPIC_NOT_EXIST);
    ...
}

The message template has two {} placeholders but only one argument. With SLF4J semantics the second placeholder is rendered literally, so the log line is:

The parentTopic xxx not exist, consumer: {}

The consumer group (available in PopLiteMessageRequestHeader#getConsumerGroup()) never appears. When a parent topic is deleted or a client is misconfigured, this ERROR is the only server-side trace of affected consumers — without the group, operators cannot tell who is impacted.

Steps to Reproduce

Unit-level, deterministic (PopLiteMessageProcessorTest harness):

  1. Build a PopLiteMessageRequestHeader with a topic that TopicConfigManager#selectTopicConfig returns null for and consumerGroup = "groupA".
  2. Call popLiteMessageProcessor.preCheck(ctx, requestHeader, response); it returns TOPIC_NOT_EXIST.
  3. Capture the formatted log event for logger RocketmqPopLite: the message is The parentTopic xxx not exist, consumer: {} — groupA is absent.
What Did You Expect to See?

The parentTopic xxx not exist, consumer: groupA

What Did You See Instead?

The parentTopic xxx not exist, consumer: {}

Additional Context

Only this line in the lite pop path has a placeholder/argument mismatch (verified by scanning all LOGGER/POP_LOGGER calls in PopLiteMessageProcessor, LiteEventDispatcher, LiteSubscriptionRegistryImpl, PopLiteLongPollingService and NotificationProcessor for the lite area). The sibling processor NotificationProcessor logs the remote address in the equivalent branch, so the pattern of identifying the caller is established — here the consumer group from the request header is the natural identifier.

Lingua principale
Java
Stelle
22.7k
Fork
12k
Merge medio
3g 18h
PR unite (30g)
17

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/rocketmq

Tutte le issue di apache/rocketmq

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.