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

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

parent bf7fa4be
......@@ -23,6 +23,7 @@ import org.springframework.boot.autoconfigure.amqp.SimpleRabbitListenerContainer
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.annotation.Order;
import org.springframework.util.ObjectUtils;
@Configuration
@Order(1)
......@@ -84,9 +85,11 @@ public class RabbitConfig {
rabbitTemplate.setConfirmCallback(new RabbitTemplate.ConfirmCallback() {
@Override
public void confirm(CorrelationData correlationData, boolean ack, String cause) {
if(!ObjectUtils.isEmpty(correlationData)){
// 发送消息的时候发送的业务id
log.info("发送消息id:{},ack:{}",correlationData.getId(),ack);
}
}
});
rabbitTemplate.setReturnCallback(messageCallbackService);
......
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