awslabs/amazon-sqs-java-temporary-queues-client

Max Idle Queue Retention Period is set to 5 minutes

adarshs13 opened this issue · 1 comments

The maximum idle queue retention period is set to 5 min in the AmazonSQSIdleQueueDeletingClient ( https://github.com/awslabs/amazon-sqs-java-temporary-queues-client/blob/master/src/main/java/com/amazonaws/services/sqs/AmazonSQSIdleQueueDeletingClient.java#L73 ).

This upper bound appears to be arbitrary without a technical limitation keeping users from specifying a larger value.

Services with longer running tasks may not send/receive messages on the temporary queues as frequently as 5 minutes meaning that virtual queues can be unexpectedly deleted even when they are in use

Good suggestion and safe enough to raise within reason. What is the maximum period you intend to be able to set?

Services with longer running tasks may not send/receive messages on the temporary queues as frequently as 5 minutes meaning that virtual queues can be unexpectedly deleted even when they are in use

Just to clarify, the IdleQueueRetentionPeriodSeconds attribute only controls how long a queue can sit empty and without any API calls before it is a candidate for deletion. A host queue will always have at least one background thread polling it via ReceiveMessage calls and hence keep it from being idle, and virtual queues are usually polled in a similar way as soon as they are created (. This parameter is intended to be tight enough so that queues can't be leaked for TOO long, but loose enough to allow for potential pauses in the processes using queues (e.g. garbage collection). Do you actually need this period to be longer than 5 minutes?