Share this page

# LrSqsClient.resetQueueUrl

Replaces the current queue URL with a new URL.

`public static void resetQueueUrl(String newQueueUrl)`

## Arguments

Name | Description
--- | ---
newQueueUrl | New URL of the message queue.

## Return values

This function does not return any values.

## General information

This API replaces the queue URL with the new provided string.

## Example

Copy code

    public void changeQueue() {

      String standardQueueUrl = "https://sqs.eu-central-1.amazonaws.com/123456789/jsmith-sqs0";
      String fifoQueueUrl = "https://sqs.eu-central-1.amazonaws.com/123456789/jsmith-sqsfifo0.fifo";
      LrAwsRegion region = LrAwsRegion.EU_CENTRAL_1;

      LrSqsClient.initClient(region, ""); // unused queueUrl

      for (String queueUrl : new ArrayList<String>() {{ add(standardQueueUrl); add(fifoQueueUrl); }}) {

      LrSqsClient.resetQueueUrl(queueUrl);

       if (queueUrl.equals(standardQueueUrl))
                LrSqsClient.sendMessage("abc");
       else
                LrSqsClient.sendMessage("abc", "a", "aaaa");

        }

        LrSqsClient.closeClient();
    }

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: