You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "messere1 (via GitHub)" <gi...@apache.org> on 2026/10/14 07:27:08 UTC

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

messere1 opened a new issue, #11435:
URL: https://github.com/apache/rocketmq/issues/11435

   ### Before Creating the Bug Report
   
   - [x] I found a bug, not just asking a question, which should be created in [GitHub Discussions](https://github.com/apache/rocketmq/discussions).
   
   - [x] I have searched the [GitHub Issues](https://github.com/apache/rocketmq/issues) and [GitHub Discussions](https://github.com/apache/rocketmq/discussions) of this repository and believe that this is not a duplicate.
   
   - [x] 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:
   
   ```java
   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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #11435:
URL: https://github.com/apache/rocketmq/issues/11435#issuecomment-6163836429

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase.
   
   **Root Cause:** `PopLiteMessageProcessor#preCheck` calls `LOGGER.error("The parentTopic {} not exist, consumer: {} ", requestHeader.getTopic())` — the SLF4J template has two `{}` placeholders but only one argument is passed. The consumer group from `requestHeader.getConsumerGroup()` is never rendered.
   
   **Impact:** When a parent topic is deleted or a client is misconfigured, this ERROR log is the only server-side trace. Without the consumer group, operators cannot identify which consumers are affected.
   
   **Severity:** low — logging deficiency, no functional impact on message processing.
   
   **Fix:** Add `requestHeader.getConsumerGroup()` as the second argument to the `LOGGER.error()` call.
   
   An automated fix proposal will be generated. Reply `/approve` to proceed with PR generation.
   
   ---
   *Automated evaluation by RockteMQ-AI*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #11435:
URL: https://github.com/apache/rocketmq/issues/11435#issuecomment-6163962568

   **Fix Spec — Issue #11435**
   
   A fix proposal has been generated based on code analysis.
   
   **Root Cause:** `PopLiteMessageProcessor.java:190` — SLF4J template has two `{}` placeholders but only one argument (`requestHeader.getTopic()`) is passed. The consumer group is silently dropped.
   
   **Fix:** Add `requestHeader.getConsumerGroup()` as the second argument:
   ```java
   // before
   LOGGER.error("The parentTopic {} not exist, consumer: {} ", requestHeader.getTopic());
   // after
   LOGGER.error("The parentTopic {} not exist, consumer: {} ", requestHeader.getTopic(), requestHeader.getConsumerGroup());
   ```
   
   **Scope:** Single line change, no API/behavior impact. All sibling processors already pass 2 args correctly.
   
   Reply `/approve` to proceed with PR generation, `/revise <feedback>` to request changes, or `/reject` to decline.
   
   ---
   *Automated fix proposal by RockteMQ-AI*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org