Share this page

# LrSqsMessage.messageId

Retrieves the message ID.

`public final String messageId()`

## Return values

This function returns a String representing the message ID.

## Example

Copy code

    public void lrsqsMessage(){
            LrSqsClient.initClient(region, standardQueueUrl);

            LrSqsMessage message = LrSqsClient.receiveMessage();
            if (message != null) {
                lr.output_message("messageID: " + message.messageId());
                lr.output_message("body: " + message.body());
                lr.output_message("receiptHandle: " + message.receiptHandle());
                lr.output_message("md5OfBody: " + message.md5OfBody());
                lr.output_message("md5ofAttributes: " + message.md5OfAttributes());
                lr.output_message("Full LrSqsMessage: " + message.toString());

         if (message.hasSystemAttributes()) {
                Map<String, String> sustemAttrib = message.systemAttributesAsStrings();
                Map<LrSqsMessageSystemAttributeName, String> sustemAttrib_name = message.systemAttributes();
                }

                if (message.hasAttributes()) {
                      Map<String, LrSqsMessageAttributeValue> userAttrib = message.attributes();
                }
            }
            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: