Class CloudQueueMessage
- Namespace
- Microsoft.WindowsAzure.Storage.Queue
- Assembly
- Microsoft.WindowsAzure.Storage.dll
Represents a message in the Microsoft Azure Queue service.
public sealed class CloudQueueMessage
- Inheritance
-
CloudQueueMessage
- Inherited Members
Constructors
CloudQueueMessage(byte[])
Initializes a new instance of the CloudQueueMessage class with the given byte array.
public CloudQueueMessage(byte[] content)
Parameters
content
byte[]The content of the message as a byte array.
CloudQueueMessage(string)
Initializes a new instance of the CloudQueueMessage class with the given string.
public CloudQueueMessage(string content)
Parameters
content
stringThe content of the message as a string of text.
CloudQueueMessage(string, string)
Initializes a new instance of the CloudQueueMessage class with the given message ID and pop receipt.
public CloudQueueMessage(string messageId, string popReceipt)
Parameters
messageId
stringA string specifying the message ID.
popReceipt
stringA string containing the pop receipt token.
Properties
AsBytes
Gets the content of the message as a byte array.
public byte[] AsBytes { get; }
Property Value
- byte[]
The content of the message as a byte array.
AsString
Gets the content of the message, as a string.
public string AsString { get; }
Property Value
- string
A string containing the message content.
DequeueCount
Gets the number of times this message has been dequeued.
public int DequeueCount { get; }
Property Value
- int
The number of times this message has been dequeued.
ExpirationTime
Gets the time that the message expires.
public DateTimeOffset? ExpirationTime { get; }
Property Value
- DateTimeOffset?
A DateTimeOffset indicating the time that the message expires.
Id
Gets the message ID.
public string Id { get; }
Property Value
- string
A string containing the message ID.
InsertionTime
Gets the time that the message was added to the queue.
public DateTimeOffset? InsertionTime { get; }
Property Value
- DateTimeOffset?
A DateTimeOffset indicating the time that the message was added to the queue.
MaxMessageSize
Gets the maximum message size in bytes.
public static long MaxMessageSize { get; }
Property Value
- long
The maximum message size in bytes.
MaxNumberOfMessagesToPeek
Gets the maximum number of messages that can be peeked at a time.
public static int MaxNumberOfMessagesToPeek { get; }
Property Value
- int
The maximum number of messages that can be peeked at a time.
MaxVisibilityTimeout
Gets the maximum amount of time a message is kept in the queue.
public static TimeSpan MaxVisibilityTimeout { get; }
Property Value
NextVisibleTime
Gets the time that the message will next be visible.
public DateTimeOffset? NextVisibleTime { get; }
Property Value
- DateTimeOffset?
A DateTimeOffset indicating the time that the message will next be visible.
PopReceipt
Gets the message's pop receipt.
public string PopReceipt { get; }
Property Value
- string
A string containing the pop receipt value.
Methods
SetMessageContent(byte[])
Sets the content of this message.
public void SetMessageContent(byte[] content)
Parameters
content
byte[]The content of the message as a byte array.
SetMessageContent(string)
Sets the content of this message.
public void SetMessageContent(string content)
Parameters
content
stringA string containing the new message content.