0

Using 'io.awspring.cloud:spring-cloud-starter-aws-messaging' how can we apply a per-queue delay to the messages in the queue?

When I do the following...

sqsTemplate.convertAndSend( "myqueue.fifo", myObject, Map.of(SQS_GROUP_ID_HEADER, id, SQS_DEDUPLICATION_ID_HEADER, UUID.randomUUID().toString(), SQS_DELAY_HEADER, 1 )

I see...

org.springframework.messaging.MessageDeliveryException: Value 1 for parameter DelaySeconds is invalid. Reason: The request include parameter that is not valid for this queue type.

https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-delay-queues.html

Kevvvvyp
  • 1,704
  • 2
  • 18
  • 38

1 Answers1

0

The delay is set on the FIFO itself not via the service consuming it. enter image description here

Kevvvvyp
  • 1,704
  • 2
  • 18
  • 38