April 2018
Intermediate to advanced
280 pages
8h 37m
English
The receiving application can simply invoke the ReceiveMessageRequest constructor and pass the URL of the message queue. This creates a request object that can then be used to invoke the RecieveMessage() function. This function then in turn returns a response object that consists of the messages from the queue. This response object can then be iterated to read all the messages received from the queue.
The following code creates a request object to receive the messages and invokes the RecieveMessage() function. It then iterates over the response object and prints out all the messages received from the queue:
var receive_message_request = new ReceiveMessageRequest { QueueUrl = queue_url };var received_message_response ...