添加默认key
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.njcn.middle.rocket.domain;
|
||||
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@@ -15,7 +16,7 @@ public abstract class BaseMessage {
|
||||
/**
|
||||
* 业务键,用于RocketMQ控制台查看消费情况
|
||||
*/
|
||||
protected String key;
|
||||
protected String key = IdUtil.getSnowflake().nextIdStr();
|
||||
|
||||
/**
|
||||
* 发送消息来源,用于排查问题
|
||||
|
||||
Reference in New Issue
Block a user