0

我正在使用 ElasticMQ(通过 docker image v1.3.3)并且无法让 DLQ 工作。

这是我的elasticmq.conf

include classpath("application.conf")

node-address {
   protocol = http
   host = localhost
   port = 9324
   context-path = ""
}

rest-sqs {
   enabled = true
   bind-port = 9324
   bind-hostname = "0.0.0.0"
   // Possible values: relaxed, strict
   sqs-limits = strict
}

rest-stats {
  enabled = true
  bind-port = 9325
  bind-hostname = "0.0.0.0"
}

queues {
   main {
     defaultVisibilityTimeout = 10 seconds
     delay = 2 seconds
     receiveMessageWait = 0 seconds
     deadLettersQueue {
       name = "retry"
       maxReceiveCount = 1
     }
   }
   retry {
     defaultVisibilityTimeout = 10 seconds
     delay = 2 seconds
     receiveMessageWait = 0 seconds
   }
   deadletter {
     defaultVisibilityTimeout = 10 seconds
     delay = 2 seconds
     receiveMessageWait = 0 seconds
   }
}

我正在发送这样的消息(使用 AWS CLI):

aws --endpoint-url http://localhost:9324 sqs send-message --queue-url http://localhost:9324/queue/main --message-body "Hello, queue"

并像这样接收它:

aws --endpoint-url http://localhost:9324 sqs receive-message --queue-url http://localhost:9324/queue/main --wait-time-seconds 10

我没有从队列中删除消息,但消息正在被删除并且没有被移动到 DLQ(即重试队列)。我也在尝试使用 Java 代码接收消息并获得相同的结果。

这是为什么?

4

0 回答 0