You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2019/11/21 05:24:57 UTC
[GitHub] [rocketmq-spring] zainzhoucom opened a new issue #176: Why don't
you take a TAG from the Header
zainzhoucom opened a new issue #176: Why don't you take a TAG from the Header
URL: https://github.com/apache/rocketmq-spring/issues/176
`MessageBuilder.withPayload(new Model()).setHeader(RocketMQHeaders.TAGS,"test.tag").build()`
RocketMQUtil.getAndWrapMessage
`
//Why is that?
String[] tempArr = destination.split(":", 2);
String topic = tempArr[0];
String tags = "";
if (tempArr.length > 1) {
tags = tempArr[1];
}
Message rocketMsg = new Message(topic, tags, payloads);
`
`
//Why not
Object tag = headers.get(RocketMQHeaders.TAGS);
if(!StringUtils.isEmpty(tag)){
rocketMsg.setTags(tag.toString());
}
Object keys = headers.get(RocketMQHeaders.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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services