leizhiyuan opened a new issue, #6491:
URL: https://github.com/apache/rocketmq/issues/6491
**BUG REPORT**
1. Please describe the issue you observed:
- What did you do (The steps to reproduce)?
When namespace and % are included in the topic, the message ack will fail.
This is because the topic is split into the part after %.
```
public Message buildMessage(MessageExt messageExt) {
Map<String, String> userProperties = buildUserAttributes(messageExt);
SystemProperties systemProperties =
buildSystemProperties(messageExt);
Resource topic = buildResource(messageExt.getTopic());
return Message.newBuilder()
.setTopic(topic)
.putAllUserProperties(userProperties)
.setSystemProperties(systemProperties)
.setBody(ByteString.copyFrom(messageExt.getBody()))
.build();
}
```
the will convert the message
```
public static MessageViewImpl fromProtobuf(Message message, MessageQueueImpl
mq,
Long transportDeliveryTimestamp) {
final SystemProperties systemProperties =
message.getSystemProperties();
final String topic = message.getTopic().getName();
final MessageId messageId =
MessageIdCodec.getInstance().decode(systemProperties.getMessageId());
final Digest bodyDigest = systemProperties.getBodyDigest();
byte[] body = message.getBody().toByteArray();
boolean corrupted = false;
final String checksum = bodyDigest.getChecksum();
```
client only read the short topic.
- What is expected to see?
- What did you see instead?
2. Please tell us about your environment:
3. Other information (e.g. detailed explanation, logs, related issues,
suggestions on how to fix, etc):
**FEATURE REQUEST**
1. Please describe the feature you are requesting.
2. Provide any additional detail on your proposed use case for this feature.
3. Indicate the importance of this issue to you (blocker, must-have,
should-have, nice-to-have). Are you currently using any workarounds to address
this issue?
4. If there are some sub-tasks involved, use -[] for each sub-task and
create a corresponding issue to map to the sub-task:
- [sub-task1-issue-number](example_sub_issue1_link_here): sub-task1
description here,
- [sub-task2-issue-number](example_sub_issue2_link_here): sub-task2
description here,
- ...
--
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]