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

オープン
#11,435 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@messere1 がすでに取り組んでいます。

2026年10月14日 から。

  • #11436 @messere1 による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
java
領域
backend

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
Java
スター
22.7k
フォーク
12k
平均マージ
3日 18時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/rocketmq のほかの issue

apache/rocketmq の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。