RockteMQ-AI commented on issue #782:
URL:
https://github.com/apache/rocketmq-spring/issues/782#issuecomment-5631410948
**Issue Evaluation**
Category: `bug` | Status: **Confirmed**
The reported issue has been verified against the current codebase.
**Root Cause:**
In `ListenerContainerConfiguration.createRocketMQListenerContainer()` (line
101), the code uses
`environment.resolvePlaceholders(annotation.consumerGroup())` to resolve the
consumerGroup value. While this should work for both literal values and
placeholders, there appears to be an issue with how literal values are being
processed or validated.
Additionally, the `validate()` method (lines 112-117) does not validate
consumerGroup, but `DefaultListenerContainer.afterPropertiesSet()` (line 258)
requires it via `Assert.hasText(consumerGroup, "Property 'consumerGroup' is
required")`.
The issue manifests in two scenarios:
1. Literal values like `"test-delay-topic-001"` fail to start
2. Placeholder values with defaults like `"${property:default}"` fail when
the property doesn't exist in configuration
**Impact:** Users cannot use literal consumerGroup values in
`@RocketMQMessageListener` annotations, forcing them to define configuration
properties even for simple use cases.
**Severity:** High - blocks basic usage of the v5 client Spring Boot
integration
**Affected Files:**
-
`rocketmq-v5-client-spring-boot/src/main/java/org/apache/rocketmq/client/autoconfigure/ListenerContainerConfiguration.java`
-
`rocketmq-v5-client-spring-boot/src/main/java/org/apache/rocketmq/client/support/DefaultListenerContainer.java`
**Note:** This may be related to issue #776 (AnnotationEnhancer chain
silently discards modifications). Further investigation needed to determine the
exact validation path causing the failure.
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]