April 2018
Intermediate to advanced
280 pages
8h 37m
English
Using the SQS object, invoke the send_message() function and pass the queue URL, delay time, message, and the message attributes to it. The message attributes hold the metadata related to the actual message.
The following code snippet sends a message to the queue:
# Send message to SQS queueresponse = sqs_object.send_message( QueueUrl=queue_url, DelaySeconds=10, MessageAttributes={ 'Title': { 'DataType': 'String', 'StringValue': 'Hybrid Cloud for Developers' }, 'Author': { 'DataType': 'String', 'StringValue': 'Manoj Hirway' }, 'Publisher': { 'DataType': 'String', 'StringValue': 'packt publication' } }, MessageBody=( 'Welcome, hybrid cloud developers ' ))
When a message is successfully sent to the queue, the ...