Azure Storage Queue Plugin

The plugin provides functionality to interact with Storage Queue

Installation

Example 1. build.gradle
implementation(group: 'org.vividus', name: 'vividus-plugin-azure-storage-queue', version: '0.3.5-SNAPSHOT')

Configuration

Queues configuration

Queues are configured with a set of properties with the following format:

azure.storage.queue.{queue-name}.{property-name}=property value

Where:

  1. queue-name - The name of the queue which will be used as a step parameter

  2. property-name - The name of the queue property. One of:

    1. name - The name of the queue

    2. sas-token - The SAS token

    3. queue - The queue endpoint

Steps

Peek messages

Peeks messages from the queue

When I peek up to `$count` messages from queue `$queueName` and save result to $scopes variable `$variableName`
  • $count - The nember of messages to peek

  • $queueName - The name of the queue

  • $scopes - The comma-separated set of the variables scopes.

  • $variableName - The variable name to store results in JSON format. If the variable name is my-var, the following variables will be created:

    • ${my-var[0].messageId} - The message id

    • ${my-var[0].insertionTime} - The message insertion time

    • ${my-var[0].expirationTime} - The message expiration time

    • ${my-var[0].messageText} - The message text

Example 2. Peek the messages
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].messageText}`

Send message

Sends message to the queue

When I send message `$message` to queue `$queueName` and save result to $scopes variable `$variableName`
  • $message - The message to send

  • $queueName - The name of the queue

  • $scopes - The comma-separated set of the variables scopes.

  • $variableName - The variable name to store results in JSON format. If the variable name is my-var, the following variables will be created:

    • ${my-var.messageId} - The message id

    • ${my-var.insertionTime} - The message insertion time

    • ${my-var.expirationTime} - The message expiration time

Example 3. Send the messages
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 to scenario variable `result`