Is there a way to get an array response for val getQueueUrlResponse
on SQSClient.getQueueUrl
method call with an array of sqsName
s? I have many sqsNames
and I'd like to batch the request into one request, I'd like to avoid hitting SQSClient
multiple times.
val getQueueUrlResponse = sqsClient.getQueueUrl(GetQueueUrlRequest.builder.queueName(sqsName).build)
So if I have 10 elements in Array sqsName
, I'd like 10 elements in the getQueueUrlResponse
val. I only see one value per call, but I may not be understanding something since I'm new to java/scala. TIA!
CodePudding user response:
The GetQueueUrl
request supports just one SQS queueName at a time. Therefore there's also no way to get an array back.
As an alternative you could check if it's feasible to do a single ListQueues
request instead. That supports filtering by a common queue name prefix (or returns everything, depending on the size potentially in multiple pages).