File tree Expand file tree Collapse file tree
common/src/main/java/org/apache/rocketmq/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222import java .util .HashMap ;
2323import java .util .Map ;
2424import java .util .Objects ;
25+ import org .apache .rocketmq .common .attribute .AttributeParser ;
2526import org .apache .rocketmq .common .attribute .TopicMessageType ;
2627import org .apache .rocketmq .common .constant .PermName ;
2728
@@ -203,7 +204,9 @@ public TopicMessageType getTopicMessageType() {
203204 if (attributes == null ) {
204205 return TopicMessageType .NORMAL ;
205206 }
206- String content = attributes .get (TOPIC_MESSAGE_TYPE_ATTRIBUTE .getName ());
207+ String content = attributes .get (TOPIC_MESSAGE_TYPE_ATTRIBUTE .getName ()) == null
208+ ? attributes .get (AttributeParser .ATTR_ADD_PLUS_SIGN + TOPIC_MESSAGE_TYPE_ATTRIBUTE .getName ())
209+ : attributes .get (TOPIC_MESSAGE_TYPE_ATTRIBUTE .getName ());
207210 if (content == null ) {
208211 return TopicMessageType .NORMAL ;
209212 }
@@ -212,7 +215,7 @@ public TopicMessageType getTopicMessageType() {
212215
213216 @ JSONField (serialize = false , deserialize = false )
214217 public void setTopicMessageType (TopicMessageType topicMessageType ) {
215- attributes .put (TOPIC_MESSAGE_TYPE_ATTRIBUTE .getName (), topicMessageType .getValue ());
218+ attributes .put (AttributeParser . ATTR_ADD_PLUS_SIGN + TOPIC_MESSAGE_TYPE_ATTRIBUTE .getName (), topicMessageType .getValue ());
216219 }
217220
218221 @ Override
You can’t perform that action at this time.
0 commit comments