Share this page

# LrSqsClient.initClient

Initializes the LrSqsClient for the current Vuser.

`public static void initClient (LrAwsRegion awsRegion, String queueUrl)`

## Arguments

Name | Description
--- | ---
awsRegion | Physical location of the Amazon cluster. For available values, see LrAwsRegion.
queueUrl | URL of the message queue.

## Return values

This function does not return any values.

## General information

This function initializes an SQS client for the Vuser. You must call this function in order to use the client object. If any other SQS API is called before this function, the called API fails.

It is recommended to call this function in the init section of the Vuser script.

Each Vuser can instantiate only one client at a time. If this function is called more than once in a script, without using the closeClient API in between the initializations, an error is shown in the replay log.

## Example

Copy code

    public int init() throws Throwable {

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

            LrSqsClient.initClient(region, fifoQueueUrl);

            return 0;
     }

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