Amazon.SQS.AmazonSQSClient.SendMessage C# (CSharp) Method

SendMessage() public method

Delivers a message to the specified queue.

The following list shows the characters (in Unicode) that are allowed in your message, according to the W3C XML specification:

  • #x9

  • #xA

  • #xD

  • #x20 to #xD7FF

  • #xE000 to #xFFFD

  • #x10000 to #x10FFFF

For more information, see RFC1321. If you send any characters that aren't included in this list, your request is rejected.

/// The message contains characters outside the allowed set. /// /// Error code 400. Unsupported operation. ///
public SendMessage ( SendMessageRequest request ) : SendMessageResponse
request Amazon.SQS.Model.SendMessageRequest Container for the necessary parameters to execute the SendMessage service method.
return Amazon.SQS.Model.SendMessageResponse
        public SendMessageResponse SendMessage(SendMessageRequest request)
        {
            var marshaller = new SendMessageRequestMarshaller();
            var unmarshaller = SendMessageResponseUnmarshaller.Instance;

            return Invoke<SendMessageRequest,SendMessageResponse>(request, marshaller, unmarshaller);
        }

Same methods

AmazonSQSClient::SendMessage ( string queueUrl, string messageBody ) : SendMessageResponse

Usage Example

        static void WriteToQueue(AWSCredentials credentials)
        {
            AmazonSQSClient client = new AmazonSQSClient(credentials, RegionEndpoint.USEast1);

            string message = "my message";
            string queueUrl = "https://sqs.us-east-1.amazonaws.com/025631894481/aws-talk";

            SendMessageResponse sendMessageResponse = client.SendMessage(queueUrl, message);
        }
All Usage Examples Of Amazon.SQS.AmazonSQSClient::SendMessage
AmazonSQSClient