未创建死信队列

时间:2021-04-16 19:22:35

标签: java spring spring-boot rabbitmq spring-cloud-stream

我的交换和 dlq 没有被创建。我在下面的 YML 中有以下内容。我确实创建了一个匿名队列,但也没有发布任何消息。任何想法。

  rabbit:
    bindings:
      documentrequest-policyinqadapter:
        producer:
          bindingRoutingKey: documentrequest.adapter.*.*.*.policyinq.req
          routing-key-expression: headers['events-type']
        consumer:
          autoBindDlq: true
          republishToDlq: true
          requeueRejected: 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 个答案:

答案 0 :(得分:0)

匿名订阅不支持死信队列;您必须向消费者绑定添加 group