生产数据增生产加消息的机器IP
This commit is contained in:
parent
f3fd54906f
commit
57be7f3f33
@ -15,6 +15,7 @@ package delay
|
||||
type ProduceData struct {
|
||||
MsgID string `json:"msg_id"` // 消息ID
|
||||
Timestamp int64 `json:"timestamp"` // 消息生成时间: ms
|
||||
Host string `json:"host"` // 生产消息的机器IP
|
||||
Data map[string]interface{} `json:"data"` // 传入的业务数据
|
||||
}
|
||||
|
||||
|
@ -69,6 +69,7 @@ func (rp *redisProduce) buildAddMember(queueData *Queue) *redis.Z {
|
||||
byteData, _ := json.Marshal(&ProduceData{
|
||||
MsgID: util.String.Md5(util.String.GenRandom("", 16)),
|
||||
Timestamp: time.Now().UnixNano() / 1e6,
|
||||
Host: util.IP.GetHostIP(),
|
||||
Data: queueData.Data,
|
||||
})
|
||||
return &redis.Z{
|
||||
|
Loading…
Reference in New Issue
Block a user