dugenkui03 opened a new issue #4103:
URL: https://github.com/apache/rocketmq/issues/4103
Replace the implementions of `Message#setKeys` with `String.join`, and we
can simply optimized the join operation(cpu or gc) depending on jvm/jdk.
```java
public void setKeys(Collection<String> keys) {
StringBuilder sb = new StringBuilder();
for (String k : keys) {
sb.append(k);
sb.append(MessageConst.KEY_SEPARATOR);
}
this.setKeys(sb.toString().trim());
}
```
```java
this.setKeys(String.join(MessageConst.KEY_SEPARATOR, keys));
```
--
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]