April 2018
Intermediate to advanced
280 pages
8h 37m
English
A message can be sent by invoking the constructor of the SendMessageRequest class and passing the URL of the queue and the message body.
The following code sends a message to the queue:
//Sending a messageConsole.WriteLine("Sending a message to MyQueue.\n");var send_message_request = new SendMessageRequest{ QueueUrl = queue_url, //URL from initial queue creation MessageBody = "Welcome, hybrid cloud developers !"};sqs_object.SendMessage(send_message_request);
When one component of the application sends a message to the queue, the other component should receive the message. Let's look at how to receive a message from the queue.