Share this page

# LrSqsClient.createMessageAttributeValueInt

Creates an integer attribute value that can be assigned to a message.

`public static LrSqsMessageAttributeValue createMessageAttributeValueInt (String value)`

`public static LrSqsMessageAttributeValue createMessageAttributeValueInt (int value)`

## Arguments

Name | Description
--- | ---
value | The string value of the attribute.
value | The integer value of the attribute.

## Return values

This function returns an LrSqsMessageAttributeValue object. For details, see LrSqsMessageAttributeValue.

## General information

LrSqsMessageAttributeValue can be used as a value in the key-value pairs of a message attribute.

## Example

Copy code

    public void sendMessageEx(){

        HashMap<String, LrSqsMessageAttributeValue> messageAttributes = new HashMap<String, LrSqsMessageAttributeValue>();
        messageAttributes.put("attrib1", LrSqsClient.createMessageAttributeValueString("my string attribute"));
        messageAttributes.put("attrib2", LrSqsClient.createMessageAttributeValueInt("1234"));
        messageAttributes.put("attrib3", LrSqsClient.createMessageAttributeValueInt(5678));
        messageAttributes.put("attrib4", LrSqsClient.createMessageAttributeValueDouble(56.78));
        messageAttributes.put("attrib5", LrSqsClient.createMessageAttributeValueBinary("string binary to bytes".getBytes()));
        messageAttributes.put("attrib6", LrSqsClient.createMessageAttributeValueBinary("string binary value"));

        LrSqsClient.initClient(region, standardQueueUrl);
        LrSqsClient.sendMessageEx("MessageBody1", 0, messageAttributes);

        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: