Description Usage Arguments Details Value Author(s) References See Also Examples
Receive one or more messages from an SQS queue.
1 2 3 4 5 6 | receive_msg(queue, attributes = NULL, n = 1, timeout = NULL,
wait = NULL, query = NULL, ...)
consume_msg(queue, receive_args = list(), delete_args = list())
delete_msg(queue, handle, query = NULL, ...)
|
queue |
A character string containing a queue URL, or the name of the queue. |
attributes |
Currently ignored. |
n |
The number of messages to retrieve (maximum 10). |
timeout |
A number of seconds to make the message invisible to subsequent |
wait |
A number of seconds to wait for messages before responding to the request. |
query |
A list specifying additional query arguments to be passed to the |
... |
Additional arguments passed to |
receive_args |
A named list of arguments, other than |
delete_args |
A named list of arguments, other than |
handle |
A message handle, as returned by |
receive_msg
simply receives message(s). consume_msg
does the same and then deletes the message(s) from the queue. delete_message
deletes one or more messages from an SQS queue. If a message is not deleted, it remains visible in the queue and will be returned by subsequent calls to receive_msg
.
A data.frame of messages.
Thomas J. Leeper
ReceiveMessage DeleteMessage DeleteMessageBatch
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.