Messages are not moved to DLQ

531 views Asked by At

I'm using ElasticMQ (via docker image v1.3.3) and can't get the DLQ to work.

This is my 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
   }
}

I'm sending a message like so (using the AWS CLI):

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

And receiving it like so:

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

I'm not deleting the message from the queue but the message is being deleted and not being moved to the DLQ (i.e., the retry queue). I'm also trying to receive the message with Java code and getting the same result.

Why is that?

0

There are 0 answers