I'm using Java CDK to create a queue and a dead-letter-queue (DLQ) in AWS.
In my DLQ, I need to set the Redrive allow policy
to enabled so that it can be used as DLQ, but I can't find the function in CDK that allows me to set it.
Queue queueDlq = Queue.Builder.create(this, "queue-dlq")
.build();
Queue queue = Queue.Builder.create(this, "queue")
.deadLetterQueue(DeadLetterQueue.builder()
.queue(queueDlq)
.maxReceiveCount(5)
.build())
.build();
When I deploy this code, both queues are created. The main queue has the Dead-letter queue set correctly, but the DLQ doesn't have Redrive allow policy enabled to allow it to receive the messages.