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

Open
#11,435 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@messere1 is already working on this.

Since Oct 14, 2026.

  • #11436 by @messere1 — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
25/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
java
Domain
backend

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
Java
Stars
22.7k
Forks
12k
Avg merge
3d 18h
Merged PRs (30d)
17

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/rocketmq

All issues in apache/rocketmq

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.