We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66f2eb6 commit a26a474Copy full SHA for a26a474
1 file changed
common/plugin/mq/src/main/java/com/github/cadecode/uniboot/common/plugin/mq/rabbit/RabbitCallback.java
@@ -82,8 +82,9 @@ public void afterPropertiesSet() {
82
// 设置 correlationData 后置处理
83
rabbitTemplate.setCorrelationDataPostProcessor((message, correlationData) -> {
84
// 填充 correlationDataId 到 MessageProperties
85
- if (ObjectUtil.isNotNull(correlationData.getId())) {
86
- message.getMessageProperties().setCorrelationId(correlationData.getId());
+ if (ObjectUtil.isNotNull(correlationData) && ObjectUtil.isNotNull(correlationData.getId())) {
+ String correlationId = correlationData.getId();
87
+ message.getMessageProperties().setCorrelationId(correlationId);
88
}
89
return correlationData;
90
});
0 commit comments