This commit is contained in:
Redkale
2020-05-26 22:22:44 +08:00
parent 5a1c9215bc
commit ec4ec2ff77

View File

@@ -45,6 +45,10 @@ public class MessageRecord implements Serializable {
public MessageRecord() { public MessageRecord() {
} }
public MessageRecord(String resptopic, byte[] content) {
this(System.nanoTime(), 0, 0, null, null, resptopic, content);
}
public MessageRecord(long seqid, String topic, String resptopic, byte[] content) { public MessageRecord(long seqid, String topic, String resptopic, byte[] content) {
this(seqid, 0, 0, null, topic, resptopic, content); this(seqid, 0, 0, null, topic, resptopic, content);
} }
@@ -107,7 +111,7 @@ public class MessageRecord implements Serializable {
return this; return this;
} }
public MessageRecord contentUTF8(String content) { public MessageRecord contentUTF8String(String content) {
this.content = content == null ? null : content.getBytes(StandardCharsets.UTF_8); this.content = content == null ? null : content.getBytes(StandardCharsets.UTF_8);
return this; return this;
} }