AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Namespace: Amazon.SQS.Model
Assembly: AWSSDK.dll
Version: (assembly version)
public class SendMessageResult : AmazonWebServiceResponse
The SendMessageResult type exposes the following members
Name | Description | |
---|---|---|
SendMessageResult() |
Name | Type | Description | |
---|---|---|---|
ContentLength | System.Int64 | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
HttpStatusCode | System.Net.HttpStatusCode | Inherited from Amazon.Runtime.AmazonWebServiceResponse. | |
MD5OfMessageAttributes | System.String |
Gets and sets the property MD5OfMessageAttributes.
An MD5 digest of the non-URL-encoded message attribute string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html. |
|
MD5OfMessageBody | System.String |
Gets and sets the property MD5OfMessageBody.
An MD5 digest of the non-URL-encoded message body string. This can be used to verify that Amazon SQS received the message correctly. Amazon SQS first URL decodes the message before creating the MD5 digest. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html. |
|
MessageId | System.String |
Gets and sets the property MessageId.
An element containing the message ID of the message sent to the queue. For more information, see Queue and Message Identifiers in the Amazon SQS Developer Guide. |
|
ResponseMetadata | Amazon.Runtime.ResponseMetadata | Inherited from Amazon.Runtime.AmazonWebServiceResponse. |
This example shows how to send a message.
var client = new AmazonSQSClient(); var request = new SendMessageRequest { DelaySeconds = (int)TimeSpan.FromSeconds(5).TotalSeconds, MessageAttributes = new Dictionary<string, MessageAttributeValue> { { "MyNameAttribute", new MessageAttributeValue { DataType = "String", StringValue = "John Doe" } }, { "MyAddressAttribute", new MessageAttributeValue { DataType = "String", StringValue = "123 Main St." } }, { "MyRegionAttribute", new MessageAttributeValue { DataType = "String", StringValue = "Any Town, United States" } } }, MessageBody = "John Doe customer information.", QueueUrl = "https://sqs.us-east-1.amazonaws.com/80398EXAMPLE/MyTestQueue" }; var response = client.SendMessage(request); Console.WriteLine("For message ID '" + response.MessageId + "':"); Console.WriteLine(" MD5 of message attributes: " + response.MD5OfMessageAttributes); Console.WriteLine(" MD5 of message body: " + response.MD5OfMessageBody);
.NET Framework:
Supported in: 4.5, 4.0, 3.5
.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8
.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8