How to ensure Localstack creates SQS queue on same port?

I am trying to create an SQS queue for an integration test and Localstack ends up creating the queue on a different port every time. I need to hard code this URL so that the downstream applications can pick it up from a config. Is there a way to ensure that the queue creation happens on a predefined port?

Code for queue creation:

SqsAsyncClient sqsAsyncClient = SqsAsyncClient.builder()
                        localstack.getAccessKey(), localstack.getSecretKey()
CreateQueueRequest createQueueRequest = CreateQueueRequest.builder()
        String queueUrl = sqsAsyncClient.createQueue(createQueueRequest)

System.out.println("## URL: " + queueUrl);

The url being logged is always on a different port. Couple of runs show the log as below:

## URL: http://localhost:53380/queue/sample-queue
## URL: http://localhost:53566/queue/sample-queue

Note that I don’t have any docker container running for Localstack and above is the only config in my codebase.

Hi @varunu28,

There is documentation for the Java SDK on our website, Java | Docs (