diff --git a/common/src/main/java/org/apache/rocketmq/common/message/Message.java b/common/src/main/java/org/apache/rocketmq/common/message/Message.java index b64f3520c16..3c3ef9cf8d1 100644 --- a/common/src/main/java/org/apache/rocketmq/common/message/Message.java +++ b/common/src/main/java/org/apache/rocketmq/common/message/Message.java @@ -18,6 +18,8 @@ import org.apache.commons.lang3.math.NumberUtils; +import javax.annotation.Nullable; + import java.io.Serializable; import java.util.Arrays; import java.util.Collection; @@ -98,10 +100,12 @@ public void putUserProperty(final String name, final String value) { this.putProperty(name, value); } + @Nullable public String getUserProperty(final String name) { return this.getProperty(name); } + @Nullable public String getProperty(final String name) { if (null == this.properties) { this.properties = new HashMap<>(); @@ -125,6 +129,7 @@ public void setTopic(String topic) { this.topic = topic; } + @Nullable public String getTags() { return this.getProperty(MessageConst.PROPERTY_TAGS); } @@ -133,6 +138,7 @@ public void setTags(String tags) { this.putProperty(MessageConst.PROPERTY_TAGS, tags); } + @Nullable public String getKeys() { return this.getProperty(MessageConst.PROPERTY_KEYS); } @@ -200,6 +206,7 @@ public void setBody(byte[] body) { this.body = body; } + @Nullable public Map getProperties() { return properties; } @@ -208,6 +215,7 @@ void setProperties(Map properties) { this.properties = properties; } + @Nullable public String getBuyerId() { return getProperty(MessageConst.PROPERTY_BUYER_ID); } @@ -216,6 +224,7 @@ public void setBuyerId(String buyerId) { putProperty(MessageConst.PROPERTY_BUYER_ID, buyerId); } + @Nullable public String getTransactionId() { return transactionId; } diff --git a/pom.xml b/pom.xml index e59731896c4..437004f0ca7 100644 --- a/pom.xml +++ b/pom.xml @@ -1009,6 +1009,24 @@ io.opentelemetry opentelemetry-exporter-otlp ${opentelemetry.version} + + + org.jetbrains.kotlin + kotlin-stdlib + + + org.jetbrains.kotlin + kotlin-stdlib-common + + + org.jetbrains.kotlin + kotlin-stdlib-jdk7 + + + org.jetbrains.kotlin + kotlin-stdlib-jdk8 + + io.opentelemetry