- java.lang.Object
-
- org.redkale.mq.spi.MessageRecord
-
- 所有已实现的接口:
Serializable
public class MessageRecord extends Object implements Serializable
存在MQ里面的数据结构groupid + userid 来确定partition, 优先使用 groupid
详情见: https://redkale.org
- 从以下版本开始:
- 2.1.0
- 作者:
- zhangjx
- 另请参阅:
- 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 protected byte[]
content
protected long
createTime
protected byte
ctype
static byte
CTYPE_HTTP_REQUEST
static byte
CTYPE_HTTP_RESULT
static byte
CTYPE_PROTOBUF
static byte
CTYPE_STRING
protected int
flag
protected String
groupid
protected String
localActionName
protected Object[]
localParams
protected String
respTopic
protected long
seqid
protected String
topic
protected String
traceid
protected Serializable
userid
protected int
version
-
构造器概要
构造器 限定符 构造器 说明 MessageRecord()
protected
MessageRecord(long seqid, byte ctype, int version, int flag, long createTime, Serializable userid, String groupid, String topic, String respTopic, String traceid, byte[] content)
protected
MessageRecord(long seqid, byte ctype, int flag, Serializable userid, String groupid, String topic, String respTopic, String traceid, byte[] content)
protected
MessageRecord(long seqid, byte ctype, String topic, String respTopic, String traceid, byte[] content)
-
方法概要
-
-
-
字段详细资料
-
CTYPE_STRING
public static final byte CTYPE_STRING
- 另请参阅:
- 常量字段值
-
CTYPE_PROTOBUF
public static final byte CTYPE_PROTOBUF
- 另请参阅:
- 常量字段值
-
CTYPE_HTTP_REQUEST
public static final byte CTYPE_HTTP_REQUEST
- 另请参阅:
- 常量字段值
-
CTYPE_HTTP_RESULT
public static final byte CTYPE_HTTP_RESULT
- 另请参阅:
- 常量字段值
-
seqid
@ConvertColumn(index=1) @Comment("\u6d88\u606f\u5e8f\u5217\u53f7") protected long seqid
-
version
@ConvertColumn(index=2) @Comment("\u7248\u672c") protected int version
-
flag
@ConvertColumn(index=3) @Comment("\u6807\u8bb0\u4f4d, \u81ea\u5b9a\u4e49\u65f6\u4f7f\u7528") protected int flag
-
createTime
@ConvertColumn(index=4) @Comment("\u521b\u5efa\u65f6\u95f4") protected long createTime
-
userid
@ConvertColumn(index=5) @Comment("\u7528\u6237ID\uff0c\u65e0\u7528\u6237\u4fe1\u606f\u89c6\u4e3anull\u62160, \u5177\u4f53\u6570\u636e\u7c7b\u578b\u53ea\u80fd\u662fint\u3001long\u3001String") protected Serializable userid
-
groupid
@ConvertColumn(index=6) @Comment("\u7ec4ID") protected String groupid
-
topic
@ConvertColumn(index=7) @Comment("\u5f53\u524dtopic") protected String topic
-
respTopic
@ConvertColumn(index=8) @Comment("\u76ee\u6807topic, \u4e3a\u7a7a\u8868\u793a\u65e0\u76ee\u6807topic") protected String respTopic
-
traceid
@ConvertColumn(index=9) @Comment("\u94fe\u8defID") protected String traceid
-
content
@ConvertColumn(index=10) @Comment("\u6d88\u606f\u5185\u5bb9") protected byte[] content
-
ctype
@ConvertColumn(index=11) @Comment("\u6d88\u606f\u5185\u5bb9\u7684\u7c7b\u578b") protected byte ctype
-
localActionName
@Comment("\u672c\u5730\u9644\u52a0\u5bf9\u8c61\uff0c\u4e0d\u4f1a\u88ab\u5e8f\u5217\u5316") protected String localActionName
-
-
构造器详细资料
-
MessageRecord
public MessageRecord()
-
MessageRecord
protected MessageRecord(long seqid, byte ctype, String topic, String respTopic, String traceid, byte[] content)
-
MessageRecord
protected MessageRecord(long seqid, byte ctype, int flag, Serializable userid, String groupid, String topic, String respTopic, String traceid, byte[] content)
-
MessageRecord
protected MessageRecord(long seqid, byte ctype, int version, int flag, long createTime, Serializable userid, String groupid, String topic, String respTopic, String traceid, byte[] content)
-
-
方法详细资料
-
contentString
public String contentString()
-
localActionName
public MessageRecord localActionName(String actionName)
-
localParams
public MessageRecord localParams(Object[] params)
-
isEmptyTopic
public boolean isEmptyTopic()
-
isEmptyRespTopic
public boolean isEmptyRespTopic()
-
isEmptyTraceid
public boolean isEmptyTraceid()
-
decodeContent
public <T> T decodeContent(MessageCoder<T> coder)
-
encodeContent
public <T> MessageRecord encodeContent(MessageCoder<T> coder, T data)
-
version
public MessageRecord version(int version)
-
flag
public MessageRecord flag(int flag)
-
createTime
public MessageRecord createTime(long createtime)
-
userid
public MessageRecord userid(Serializable userid)
-
groupid
public MessageRecord groupid(String groupid)
-
topic
public MessageRecord topic(String topic)
-
respTopic
public MessageRecord respTopic(String resptopic)
-
content
public MessageRecord content(byte[] content)
-
traceid
public MessageRecord traceid(String traceid)
-
contentString
public MessageRecord contentString(String content)
-
getSeqid
public long getSeqid()
-
setSeqid
public void setSeqid(long seqid)
-
getVersion
public int getVersion()
-
setVersion
public void setVersion(int version)
-
getFlag
public int getFlag()
-
setFlag
public void setFlag(int flag)
-
getCreateTime
public long getCreateTime()
-
setCreateTime
public void setCreateTime(long createTime)
-
getUserid
public Serializable getUserid()
-
setUserid
public void setUserid(Serializable userid)
-
getTraceid
public String getTraceid()
-
setTraceid
public void setTraceid(String traceid)
-
getGroupid
public String getGroupid()
-
setGroupid
public void setGroupid(String groupid)
-
getTopic
public String getTopic()
-
setTopic
public void setTopic(String topic)
-
getRespTopic
public String getRespTopic()
-
setRespTopic
public void setRespTopic(String respTopic)
-
getContent
public byte[] getContent()
-
setContent
public void setContent(byte[] content)
-
-