Class: QueueService

QueueService

The QueueService class is used to perform operations on the Microsoft Azure Queue Service.

For more information on using the Queue Service, as well as task focused information on using it from a Node.js application, see How to Use the Queue Service from Node.js. The following defaults can be set on the Queue service. encodeMessage A flag indicating whether the message should be base-64 encoded. Default is true. defaultTimeoutIntervalInMs The default timeout interval, in milliseconds, to use for request made via the Queue service. defaultMaximumExecutionTimeInMs The default maximum execution time across all potential retries, for requests made via the Queue service. defaultLocationMode The default location mode for requests made via the Queue service. useNagleAlgorithm Determines whether the Nagle algorithm is used for requests made via the Queue service; true to use the
Nagle algorithm; otherwise, false. The default value is false.

new QueueService(storageAccountOrConnectionString, storageAccessKey, host, sasToken)

Creates a new QueueService object. If no connection string or storageaccount and storageaccesskey are provided, the AZURE_STORAGE_CONNECTION_STRING or AZURE_STORAGE_ACCOUNT and AZURE_STORAGE_ACCESS_KEY environment variables will be used.

Parameters:
Name Type Argument Description
storageAccountOrConnectionString string <optional>

The storage account or the connection string.

storageAccessKey string <optional>

The storage access key.

host string | object <optional>

The host address. To define primary only, pass a string. Otherwise 'host.primaryHost' defines the primary host and 'host.secondaryHost' defines the secondary host.

sasToken string <optional>

The Shared Access Signature token.

Source:

Extends

  • StorageServiceClient

Methods

clearMessages(queue, options, callback)

Clears all messages from the queue.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResponse

error will contain information if an error occurs; otherwise response will contain information related to this operation.

Source:

createMessage(queue, messageText, options, callback)

Adds a new message to the back of the message queue. The encoded message can be up to 64KB in size for versions 2011-08-18 and newer, or 8KB in size for previous versions. Unencoded messages must be in a format that can be included in an XML request with UTF-8 encoding. Queue messages are encoded by default. See queueService.encodeMessage to set encoding defaults.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

messageText string | Buffer

The message text.

options object <optional>

The request options.

Properties
Name Type Argument Description
messagettl int <optional>

The time-to-live interval for the message, in seconds. The maximum time-to-live allowed is 7 days. If this parameter is omitted, the default time-to-live is 7 days

visibilityTimeout int <optional>

Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message cannot be set to a value later than the expiry time. visibilitytimeout should be set to a value smaller than the time-to-live value.

locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain the result. response will contain information related to this operation.

Source:
Example
var azure = require('azure-storage');
var queueService = azure.createQueueService();
queueService.createMessage('taskqueue', 'Hello world!', function(error) {
  if(!error) {
    // Message inserted
  }
});

createQueue(queue, options, callback)

Creates a new queue under the given account.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

options object <optional>

The request options.

Properties
Name Type Argument Description
metadata object <optional>

The metadata key/value pairs.

locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain the queue information. response will contain information related to this operation.

Source:

createQueueIfNotExists(queue, options, callback)

Creates a new queue under the given account if it doesn't exist.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

options object <optional>

The request options.

Properties
Name Type Argument Description
metadata object <optional>

The metadata key/value pairs.

locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will be true if the queue was created by this operation and false if not, and response will contain information related to this operation.

Source:
Example
var azure = require('azure-storage');
var queueService = azure.createQueueService();
queueService.createQueueIfNotExists('taskqueue', function(error) {
  if(!error) {
    // Queue created or exists
  }
}); 

deleteMessage(queue, messageId, popReceipt, options, callback)

Deletes a specified message from the queue.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

messageId string

The message identifier of the message to delete.

popReceipt string

A valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation

options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResponse

error will contain information if an error occurs; response will contain information related to this operation.

Source:

deleteQueue(queue, options, callback)

Permanently deletes the specified queue.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResponse

error will contain information if an error occurs; response will contain information related to this operation.

Source:

deleteQueueIfExists(queue, options, callback)

Permanently deletes the specified queue if it exists.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain 'true' if the queue was deleted and 'false' if the queue did not exist. response will contain information related to this operation.

Source:

doesQueueExist(queue, options, callback)

Checks to see if a queue exists.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise, result will be true if the queue exists and false if not, and response will contain information related to this operation.

Source:

generateSharedAccessSignature(queue, sharedAccessPolicy) → {string}

Retrieves a shared access signature token.

This:
Parameters:
Name Type Description
queue string

The queue name.

sharedAccessPolicy object

The shared access policy.

Properties
Name Type Argument Description
Id string <optional>

The signed identifier.

AccessPolicy.Permissions object <optional>

The permission type.

AccessPolicy.Start date | string <optional>

The time at which the Shared Access Signature becomes valid (The UTC value will be used).

AccessPolicy.Expiry date | string <optional>

The time at which the Shared Access Signature becomes expired (The UTC value will be used).

AccessPolicy.IPAddressOrRange string <optional>

An IP address or a range of IP addresses from which to accept requests. When specifying a range, note that the range is inclusive.

AccessPolicy.Protocol string

The protocol permitted for a request made with the account SAS. Possible values are both HTTPS and HTTP (https,http) or HTTPS only (https). The default value is https,http.

Source:
Returns:

The shared access signature query string. Note this string does not contain the leading "?".

Type
string

getMessages(queue, options, callback)

Retrieves a message from the queue and makes it invisible to other consumers.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

options object <optional>

The request options.

Properties
Name Type Argument Description
numOfMessages int <optional>

A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. By default, a single message is retrieved from the queue with this operation.

peekOnly bool <optional>

Boolean value indicating wether the visibility of the message should be changed or not.

visibilityTimeout int <optional>

Required if not peek only. Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message can be set to a value later than the expiry time.

locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain the message. response will contain information related to this operation.

Source:
Example
    
var azure = require('azure-storage');
var queueService = azure.createQueueService();
var queueName = 'taskqueue';
queueService.getMessages(queueName, function(error, serverMessages) {
  if(!error) {
    // Process the message in less than 30 seconds, the message
    // text is available in serverMessages[0].messagetext
    queueService.deleteMessage(queueName, serverMessages[0].messageid, serverMessages[0].popreceipt, function(error) {
      if(!error){
          // Message deleted
      }
    });
  }
});

getQueueAcl(queue, options, callback)

Gets the queue's ACL.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain information for the queue. response will contain information related to this operation.

Source:

getQueueMetadata(queue, options, callback)

Returns queue properties, including user-defined metadata.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain the queue information. response will contain information related to this operation.

Source:

getServiceProperties(options, callback)

Gets the properties of a storage account’s Queue service, including Microsoft Azure Storage Analytics.

This:
Parameters:
Name Type Argument Description
options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise, errorOrResult will contain the properties and response will contain information related to this operation.

Source:

getServiceStats(options, callback)

Gets the service stats for a storage account’s Queue service.

This:
Parameters:
Name Type Argument Description
options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise, result will contain the stats and response will contain information related to this operation.

Source:

listQueuesSegmented(currentToken, options, callback)

Lists a segment containing a collection of queue items whose names begin with the specified prefix under the given account.

This:
Parameters:
Name Type Argument Description
currentToken object

A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.

options object <optional>

The request options.

Properties
Name Type Argument Description
maxResults int <optional>

Specifies the maximum number of queues to return per call to Azure storage. This does NOT affect list size returned by this function. (maximum: 5000)

include string <optional>

Include this parameter to specify that the queue's metadata be returned as part of the response body. (allowed values: '', 'metadata')

locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain entries and continuationToken. entries gives a list of queues and the continuationToken is used for the next listing operation. response will contain information related to this operation.

Source:

listQueuesSegmentedWithPrefix(prefix, currentToken, options, callback)

Lists a segment containing a collection of queue items under the given account.

This:
Parameters:
Name Type Argument Description
prefix string

The prefix of the queue name.

currentToken object

A continuation token returned by a previous listing operation. Please use 'null' or 'undefined' if this is the first operation.* @param {string} [options.prefix] Filters the results to return only queues whose name begins with the specified prefix.

options object <optional>

The request options.

Properties
Name Type Argument Description
marker string <optional>

String value that identifies the portion of the list to be returned with the next list operation.

maxResults int <optional>

Specifies the maximum number of queues to return per call to Azure storage. This does NOT affect list size returned by this function. (maximum: 5000)

include string <optional>

Include this parameter to specify that the queue's metadata be returned as part of the response body. (allowed values: '', 'metadata')

locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain entries and continuationToken. entries gives a list of queues and the continuationToken is used for the next listing operation. response will contain information related to this operation.

Source:

peekMessages(queue, options, callback)

Retrieves a message from the front of the queue, without changing the message visibility.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

options object <optional>

The request options.

Properties
Name Type Argument Description
numOfMessages int <optional>

A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. By default, a single message is retrieved from the queue with this operation.

locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain the message. response will contain information related to this operation.

Source:

setQueueAcl(queue, signedIdentifiers, options, callback)

Updates the queue's ACL.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

signedIdentifiers object

The signed identifiers. Signed identifiers must be in an array.

options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain information for the queue. response will contain information related to this operation.

Source:
Example
var azure = require('azure-storage');
var SharedAccessPermissions = azure.QueueUtilities.SharedAccessPermissions;
var queueService = azure.createQueueService();
var sharedAccessPolicies = [
{AccessPolicy: {
    Permissions: PROCESS,
    Start: startDate,
    Expiry: expiryDate
  },
  Id: processOnly,
},
{AccessPolicy: {
    Permissions: SharedAccessPermissions.PROCESS + SharedAccessPermissions.DELETE,
    Start: startDate,
    Expiry: expiryDate
  },
  Id: processAndDelete,
}];

queueService.setQueueAcl(queueName, sharedAccessPolicies, function(error, queueResult, response) {
    // do whatever
});

setQueueMetadata(queue, metadata, options, callback)

Sets user-defined metadata on the specified queue. Metadata is associated with the queue as name-value pairs.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

metadata object

The metadata key/value pairs.

options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain the queue information. response will contain information related to this operation.

Source:

setServiceProperties(serviceProperties, options, callback)

Sets the properties of a storage account’s Queue service, including Microsoft Azure Storage Analytics. You can also use this operation to set the default request version for all incoming requests that do not have a version specified.

This:
Parameters:
Name Type Argument Description
serviceProperties object

The service properties.

options object <optional>

The request options.

Properties
Name Type Argument Description
locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResponse

error will contain information if an error occurs; otherwise, response will contain information related to this operation.

Source:

updateMessage(queue, messageId, popReceipt, visibilityTimeout, options, callback)

Updates the visibility timeout of a message. You can also use this operation to update the contents of a message. A message must be in a format that can be included in an XML request with UTF-8 encoding, and the encoded message can be up to 64KB in size.

This:
Parameters:
Name Type Argument Description
queue string

The queue name.

messageId string

The message identifier of the message to update.

popReceipt string

A valid pop receipt value returned from an earlier call to the Get Messages or Update Message operation

visibilityTimeout int

Specifies the new visibility timeout value, in seconds, relative to server time. The new value must be larger than or equal to 0, and cannot be larger than 7 days. The visibility timeout of a message can be set to a value later than the expiry time.

options object <optional>

The request options.

Properties
Name Type Argument Description
messageText object <optional>

The new message text.

locationMode LocationMode <optional>

Specifies the location mode used to decide which location the request should be sent to. Please see StorageUtilities.LocationMode for the possible values.

timeoutIntervalInMs int <optional>

The server timeout interval, in milliseconds, to use for the request.

maximumExecutionTimeInMs int <optional>

The maximum execution time, in milliseconds, across all potential retries, to use when making this request. The maximum execution time interval begins at the time that the client begins building the request. The maximum execution time is checked intermittently while performing requests, and before executing retries.

clientRequestId string <optional>

A string that represents the client request ID with a 1KB character limit.

useNagleAlgorithm bool <optional>

Determines whether the Nagle algorithm is used; true to use the Nagle algorithm; otherwise, false. The default value is false.

callback errorOrResult

error will contain information if an error occurs; otherwise result will contain the message result information. response will contain information related to this operation.

Source: