Commit 506e538e authored by 赵啸非's avatar 赵啸非

更新下发消息为线程池发送

parent bf7fa4be
...@@ -23,6 +23,7 @@ import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainer ...@@ -23,6 +23,7 @@ import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainer
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order; import org.springframework.core.annotation.Order;
import org.springframework.util.ObjectUtils;
@Configuration @Configuration
@Order(1) @Order(1)
...@@ -84,8 +85,10 @@ public class RabbitConfig { ...@@ -84,8 +85,10 @@ public class RabbitConfig {
rabbitTemplate.setConfirmCallback(new RabbitTemplate.ConfirmCallback() { rabbitTemplate.setConfirmCallback(new RabbitTemplate.ConfirmCallback() {
@Override @Override
public void confirm(CorrelationData correlationData, boolean ack, String cause) { public void confirm(CorrelationData correlationData, boolean ack, String cause) {
// 发送消息的时候发送的业务id if(!ObjectUtils.isEmpty(correlationData)){
log.info("发送消息id:{},ack:{}",correlationData.getId(),ack); // 发送消息的时候发送的业务id
log.info("发送消息id:{},ack:{}",correlationData.getId(),ack);
}
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment