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.
queue
The queue this message is from, an object of class StorageQueue
id
The message ID.
insertion_time
The message insertion (creation) time.
expiry_time
The message expiration time.
text
The message text.
receipt
A 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_time
The time when this message will be next visible.
dequeue_count
The 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)
message
Details about the message.
queue
Object 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_timeout
The new visibility timeout (time to when the message will again be visible).
text
Optionally, 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)
deep
Whether 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.