I have created a FIFO queue, but would like to limit the number of requests it can make, so as not to overload the server it is sending those requests to.
CDK Code:
this.intoMagento = new Queue(this, "intoAPI", {
queueName: `intoAPI.fifo`,
fifo: true,
contentBasedDeduplication: true,
visibilityTimeout: Duration.minutes(5),
fifoThroughputLimit: FifoThroughputLimit.PER_QUEUE,
});
Whilst I've limited the throughput PER_QUEUE
, how do I tell it I only want to do 600 HTTP
POST
requests per minute? Do I do it in my Lambda Queue Consumer?
Also, is FifoThroughputLimit.PER_QUEUE
only appropriate for high throughout SQS queues, or can it apply to standard queues too? I have many message groups.