rabbitTemplate.convertSendAndReceive返回值为null
作者:互联网
rabbitTemplate.convertSendAndReceive返回值为null
RabbitTemplate类中private long replyTimeout = 5000L;默认是5s,当mq业务执行时间超过5s还没有执行完,生产者就会收到返回值null。通过配置文件修改reply-timeout的值就好了。
spring:
rabbitmq:
host: localhost
port: ****
username: ****
password: ****
template:
reply-timeout: 8000
标签:rabbitTemplate,5s,返回值,convertSendAndReceive,reply,null 来源: https://blog.csdn.net/qq_44137046/article/details/121033854