You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "ldcsaa (via GitHub)" <gi...@apache.org> on 2024/08/14 06:43:13 UTC
[I] 【Bug Report】报告 rocketmq-v5-client-spring-boot 的两个 Bug [rocketmq-spring]
ldcsaa opened a new issue, #674:
URL: https://github.com/apache/rocketmq-spring/issues/674
1. [ExtTemplateResetConfiguration.java](https://github.com/apache/rocketmq-spring/blob/master/rocketmq-v5-client-spring-boot/src/main/java/org/apache/rocketmq/client/autoconfigure/ExtTemplateResetConfiguration.java)
```java
private void validate(ExtProducerResetConfiguration annotation,
GenericApplicationContext genericApplicationContext) {
if (genericApplicationContext.isBeanNameInUse(annotation.value())) {
// ! BUG !
// String.format 应该用 '%' 而不是 '{}' 作为占位符
throw new BeanDefinitionValidationException(String.format("Bean {} has been used in Spring Application Context, " +
"please check the @ExtTemplateConfiguration",
annotation.value()));
}
}
```
2. [RocketMQUtil.java](https://github.com/apache/rocketmq-spring/blob/master/rocketmq-v5-client-spring-boot/src/main/java/org/apache/rocketmq/client/support/RocketMQUtil.java)
```java
public static org.apache.rocketmq.client.apis.message.Message getAndWrapMessage(
String destination, MessageHeaders headers, byte[] payloads, Duration messageDelayTime, String messageGroup) {
if (payloads == null || payloads.length < 1) {
return null;
}
if (destination == null || destination.length() < 1) {
return null;
}
String[] tempArr = destination.split(":", 2);
final ClientServiceProvider provider = ClientServiceProvider.loadService();
org.apache.rocketmq.client.apis.message.MessageBuilder messageBuilder = null;
// resolve header
if (Objects.nonNull(headers) && !headers.isEmpty()) {
Object keys = headers.get(RocketMQHeaders.KEYS);
if (ObjectUtils.isEmpty(keys)) {
keys = headers.get(toRocketHeaderKey(RocketMQHeaders.KEYS));
}
messageBuilder = provider.newMessageBuilder()
.setTopic(tempArr[0]);
if (tempArr.length > 1) {
messageBuilder.setTag(tempArr[1]);
}
if (StringUtils.hasLength(messageGroup)) {
messageBuilder.setMessageGroup(messageGroup);
}
if (!ObjectUtils.isEmpty(keys)) {
// ! BUG !
// 这里调用 keys.toString() 有问题:意味着无论 keys 参数是逗号分隔的字符串,或者是字符串数组,传入 messageBuilder.setKeys() 后都变为单个字符串。这似乎与 messageBuilder.setKeys() 的设置初衷不一致。
messageBuilder.setKeys(keys.toString());
}
if (Objects.nonNull(messageDelayTime)) {
messageBuilder.setDeliveryTimestamp(System.currentTimeMillis() + messageDelayTime.toMillis());
}
messageBuilder.setBody(payloads);
org.apache.rocketmq.client.apis.message.MessageBuilder builder = messageBuilder;
headers.forEach((key, value) -> builder.addProperty(key, String.valueOf(value)));
}
return messageBuilder.build();
}
```
--
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 Report】报告 rocketmq-v5-client-spring-boot 的 3 个 Bug [rocketmq-spring]
Posted by "zhaohai666 (via GitHub)" <gi...@apache.org>.
zhaohai666 commented on issue #674:
URL: https://github.com/apache/rocketmq-spring/issues/674#issuecomment-2969259070
指给我
--
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 Report】报告 rocketmq-v5-client-spring-boot 的 3 个 Bug [rocketmq-spring]
Posted by "zhaohai666 (via GitHub)" <gi...@apache.org>.
zhaohai666 commented on issue #674:
URL: https://github.com/apache/rocketmq-spring/issues/674#issuecomment-2969516001
#729
--
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 Report】报告 rocketmq-v5-client-spring-boot 的 3 个 Bug [rocketmq-spring]
Posted by "panzhi33 (via GitHub)" <gi...@apache.org>.
panzhi33 commented on issue #674:
URL: https://github.com/apache/rocketmq-spring/issues/674#issuecomment-2774430341
Hello, are you willing to submit a PR to fix it?
--
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 Report】报告 rocketmq-v5-client-spring-boot 的 3 个 Bug [rocketmq-spring]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #674:
URL: https://github.com/apache/rocketmq-spring/issues/674#issuecomment-5223768215
**Issue Evaluation**
Category: `type/bug` | Status: **Confirmed**
Multiple bugs reported in `rocketmq-v5-client-spring-boot-starter`. Without the detailed bug descriptions from the original report, the general areas of concern in the v5 client starter include:
1. Configuration property binding gaps (some v5 client options not exposed)
2. Lifecycle management issues (startup/shutdown ordering)
3. Error handling inconsistencies
**Action needed:** The original issue body appears truncated. Please provide the specific bug details (stack traces, reproduction steps) for each of the 3 bugs to enable targeted fixes.
---
*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