Example usage for com.amazonaws.services.sqs.model SendMessageResult toString

List of usage examples for com.amazonaws.services.sqs.model SendMessageResult toString

Introduction

In this page you can find the example usage for com.amazonaws.services.sqs.model SendMessageResult toString.

Prototype

@Override
public String toString() 

Source Link

Document

Returns a string representation of this object.

Usage

From source file:com.espressologic.aws.sqs.SqsAmazonService.java

License:Open Source License

/**
 * return only the message ID/*from   ww w . j a  v a  2s.  c  o  m*/
 * @param messageText
 * @return
 */
public static String sendMessage(String messageText) {
    // Send a message
    AmazonSQS sqs = createAWSCredentials();
    System.out.println("Sending a message to " + myQueueUrl + ".\n");
    SendMessageResult result = sqs.sendMessage(new SendMessageRequest(myQueueUrl, messageText));
    System.out.println(result.toString());
    return result.getMessageId();
}