Description Public fields Methods Examples
This class stores the data, metadata and behaviour associated with a message.
To generate a message object, call one of the methods exposed by the StorageQueue class.
queueThe queue this message is from, an object of class StorageQueue
idThe message ID.
insertion_timeThe message insertion (creation) time.
expiry_timeThe message expiration time.
textThe message text.
receiptA pop receipt. This is present if the message was obtained by means other than peeking, and is required for updating or deleting the message.
next_visible_timeThe time when this message will be next visible.
dequeue_countThe number of times this message has been read.
new()Creates a new message object. Rather than calling the new method manually, objects of this class should be created via the methods exposed by the StorageQueue object.
QueueMessage$new(message, queue)
messageDetails about the message.
queueObject of class StorageQueue.
delete()Deletes this message from the queue.
QueueMessage$delete()
NULL, invisibly.
update()Updates this message in the queue.
This operation can be used to continually extend the invisibility of a queue message. This functionality can be useful if you want a worker role to "lease" a message. For example, if a worker role calls get_messages and recognizes that it needs more time to process a message, it can continually extend the message's invisibility until it is processed. If the worker role were to fail during processing, eventually the message would become visible again and another worker role could process it.
QueueMessage$update(visibility_timeout, text = self$text)
visibility_timeoutThe new visibility timeout (time to when the message will again be visible).
textOptionally, new message text, either a raw or character vector. If a raw vector, it is base64-encoded, and if a character vector, it is collapsed into a single string before being sent to the queue.
The message object, invisibly.
print()Print method for this class.
QueueMessage$print(...)
...Not currently used.
The message object, invisibly.
clone()The objects of this class are cloneable with this method.
QueueMessage$clone(deep = FALSE)
deepWhether to make a deep clone.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
endp <- storage_endpoint("https://mystorage.queue.core.windows.net", key="key")
queue <- storage_queue(endp, "queue1")
msg <- queue$get_message()
msg$update(visibility_timeout=60, text="updated message")
msg$delete()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.