The plugin provides functionality to interact with Storage Queue
The storage queues endpoints are configured with the following property format:
azure.storage-queue.<key>=<endpoint>
where:
-
key
- The logical key used to refer storage queue in the steps. -
endpoint
- The queue service URL, e.g.https://storageaccount.queue.core.windows.net/
. It’s allowed to use queue service SAS URL here, in this case the authentication configuration is not required.
Peeks messages from the front of the queue up to the maximum number of messages.
When I peek up to `$maxMessagesNumber` messages from queue `$storageQueueKey` and save result to $scopes variable `$variableName`
-
$maxMessagesNumber
- The maximum number of messages to peek, if there are less messages exist in the queue than requested all the messages will be peeked. The allowed range is 1 to 32 messages. -
$storageQueueKey
- The key of storage queue from the configuration. -
$scopes
- The comma-separated set of the variables scopes. -
$variableName
- The variable name to store the list of found message bodies. The messages are accessible via zero-based index, e.g. <code>${my-keys[0]}</code> will return the first found message body.
When I peek up to `5` messages from queue `users` and save result to scenario variable `messages`
Then `{"name" : "azure"}` is equal to `${messages[0]}`
Sends message to the queue
When I send message `$message` to queue `$storageQueueKey` and save result as JSON to $scopes variable `$variableName`
-
$message
- The message to send -
$storageQueueKey
- The key of storage queue from the configuration. -
$scopes
- The comma-separated set of the variables scopes. -
$variableName
- The name of the variable to save the send message result in JSON format.
When I send message `{
"id": "1807",
"eventType": "CreateUser",
"subject": "myapp/vehicles/motorcycles",
"eventTime": "2021-03-22T12:44:07+00:00",
"data": {
"make": "lada",
"model": "xray"
},
"dataVersion": "1.0"
}` to queue `users` and save result as JSON to scenario variable `result`