send_msg: send_msg

Description Usage Arguments Value Author(s) References See Also Examples

Description

Send a message to an SQS queue

Usage

1
send_msg(queue, msg, attributes = NULL, delay = NULL, query = NULL, ...)

Arguments

queue

A character string containing a queue URL, or the name of the queue.

msg

A character vector containing one or more message bodies.

attributes

Currently ignored. (If msg is of length one, a specification of message attributes. Ignored otherwise.)

delay

A numeric value indicating the number of seconds between 0 and 900 to delay a specific message. If NULL, the default value for the queue applies.

query

A list specifying additional query arguments to be passed to the query argument of sqsHTTP.

...

Additional arguments passed to sqsHTTP.

Value

A list of message information, including the MessageId and an MD5 checksum of the message body.

Author(s)

Thomas J. Leeper

References

SendMessage SendMessageBatch

See Also

link{receive_msg} link{delete_msg}

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
  # list current queues
  list_queues()
  
  # create a queue
  queue <- create_queue("ExampleQueue")
  get_queue_url("ExampleQueue")
  
  # send message to queue
  send_msg("ExampleQueue", "This is a test message")
  # receive a message
  (m <- receive_msg("ExampleQueue", timeout = 0))
  
  # delete a message from queue
  delete_msg("ExampleQueue", m$ReceiptHandle[1])
  
  # delete queue
  delete_queue("ExampleQueue")
  

## End(Not run)

aws.sqs documentation built on May 2, 2019, 5:08 a.m.