Repository navigation
QueueStorage
This tools allows you to send and receive messages from a given Azure Queue Storage queue.
To set up Azure Queue Storage for testing and development, follow these steps.
- In the Azure Portal, search for and create a new Storage Account:
-
Name: Choose a unique name, e.g.,
clouddebuggerstorage - Primary Service: Select Azure Blob Storage
- Performance: Choose Standard
- Redundancy: Set to Locally-Redundant Storage (LRS) for cost-effective testing.
-
Name: Choose a unique name, e.g.,
- Click Create to finalize the setup.
- Within your newly created storage account, navigate to Queues and select + Queue to create a new queue:
-
Name: Enter a unique name, e.g.,
mystoragequeue
-
Name: Enter a unique name, e.g.,
- Click OK to create the queue.
- In the Azure portal, go to your storage account and select the queue you just created.
- Copy the URL to the queue. This URL will be needed to connect your application to this queue.
The tool supports two methods for authenticating access to Azure Queue Storage:
- SAS Token: Using a a Shared Access Signature (SAS) token with specific permissions.
- Managed Identity: Authenticate using a managed identity assigned.
To create a SAS token with limited permissions for secure access:
-
In the Azure Portal, navigate to your Storage Account.
-
Under Security + networking, select Shared access signature.
-
Configure the SAS token settings:
- Allowed Services: Select Queue.
- Allowed Resource Types: Select Service, Container, and Object.
- Allowed Permissions: Select Read, Add, and Process Messages.
- Expiry: Set an expiration date and time for the SAS token.
-
Click Generate SAS and connection string.
-
Copy the SAS Token from the generated results.
Note: Always store the SAS token securely, as they grant specific access rights to the queue.
To enable access to the queue using a managed identity, follow these steps:
- Navigate to your Azure Queue in the Azure Portal.
- Select Access Control (IAM) from the left-hand menu.
- Click Add role assignment.
- Choose an appropriate role for the Cloud Debugger managed identity:
- Storage Queue Data Contributor: Provides full access to manage queues and messages.
- Storage Queue Data Message Processor: Grants permissions to read and delete messages.
- Storage Queue Data Message Sender: Allows sending messages to the queue.
- Storage Queue Data Reader: Allows read-only access to messages in the queue.
- Assign the selected role to the Cloud Debugger managed identity to enable it to interact with the queue as specified.
- Open the Queue Storage receiver tool.
- Enter the storage account name and queue name separately, rather than the full queue URL.
- Supply a SAS token, or leave it empty to use the configured identity.
- Choose whether to delete messages after reading. This option is selected by default.
- Click the receive button. The tool receives up to 10 messages in one operation and displays No messages available when the result is empty.
When deletion is enabled, each received message is deleted after its details have been collected. When deletion is disabled, received messages normally remain invisible for 30 seconds, then become available to receive again. Reading therefore does not permanently remove messages unless deletion is enabled.
The operation has a ten-second time limit. This bounds the request duration; it does not mean the receiver polls for ten seconds when the queue is empty.