// This allows accessing queues where you don't have permission to list queues or query queues
if (configuration.getRegion() != null && configuration.getQueueOwnerAWSAccountId() != null) {
queueUrl = "https://sqs." + configuration.getRegion() + ".amazonaws.com/"
+ configuration.getQueueOwnerAWSAccountId() + "/" + configuration.getQueueName();
} else if (configuration.getQueueOwnerAWSAccountId() != null) {
GetQueueUrlRequest getQueueUrlRequest = new GetQueueUrlRequest();
getQueueUrlRequest.setQueueName(configuration.getQueueName());
getQueueUrlRequest.setQueueOwnerAWSAccountId(configuration.getQueueOwnerAWSAccountId());
GetQueueUrlResult getQueueUrlResult = client.getQueueUrl(getQueueUrlRequest);
queueUrl = getQueueUrlResult.getQueueUrl();
} else {
// check whether the queue already exists
ListQueuesResult listQueuesResult = client.listQueues();