Share this page

# LrSqsClient.createMessageAttributeValueString

Creates a string attribute value that can be assigned to a message.

`public static LrSqsMessageAttributeValue createMessageAttributeValueString(String value)`

## Arguments

Name | Description
--- | ---
value | The string 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 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: