我正在使用rabbitmq,并且我有一个保存消息的队列。如果消息失败,将进行3次尝试。我想把次数限制为1次,这样我就可以再次发送消息。我还有别的办法吗?提前谢谢。
bindings:
documentrequest-policyinqadapter:
destination: PI-DocumentRequestService-AdapterService-Exchange
group: dcsnt-policyinquiryadapter-documentrequest-processessor
rabbit:
bindings:
documentrequest-policyinqadapter:
producer:
routing-key-expression: headers['events-type']
consumer:
autoBindDlq: true
republishToDlq: true
default-requeue-rejected: false
bindingRoutingKey: documentrequest.adapter.*.*.*.policyinq.req
deadLetterQueueName: pi-adapter-dead-letter-queue
deadLetterExchange: PI-DocumentRequestService-AdapterService-Exchange-dlx
deadLetterRoutingKey: documentrequest.adapter.*.*.*.policyinq.req
maxAttempts: 1
maxConcurrency: 10
1条答案
按热度按时间3zwjbxry1#
maxAttempts
是所有绑定器共用的使用者绑定属性。https://docs.spring.io/spring-cloud-stream/docs/3.1.2/reference/html/spring-cloud-stream.html#_consumer_properties
您已经将其定义为兔子特定的绑定属性。
向上移动。