Databases
Azure Queue Storage Management in VS Code
Overview
Section titled “Overview”Azure Queue Storage is the queue service in an Azure storage account. Applications add messages to a queue over HTTPS, and workers such as Azure Functions pick them up and process them. A storage account can hold any number of queues, and each message can be up to 64 KiB.
With DBCode you can:
- See every queue at a glance: Each queue in the explorer shows its approximate message count
- Find a queue among many: Search the explorer by name, or filter the Queues folder by message count
- Peek at messages: Open a queue to see its first 32 messages, read without taking them off the queue
- Add messages: Add a message from the data grid
- Clear environments quickly: Purge or delete several queues at once
Connecting
Section titled “Connecting”To connect to Azure Queue Storage in DBCode:
- Open the DBCode Extension: Launch Visual Studio Code and open the DBCode extension.
- Add a New Connection: Click on the “Add Connection” icon.
- Fill in the connection settings:
- Select Azure Queue Storage as the database type
- Choose the Authentication Method and enter its details (see below)
- Connect: Click save to connect to your storage account.
- Start Browsing: Expand the storage account and its Queues folder.
For detailed instructions on connecting to databases, refer to the Connect article.
Authentication
Section titled “Authentication”| Method | What you enter |
|---|---|
| Connection String | The storage account’s connection string, from the Azure portal under Access keys. It names its own endpoint, so it also works for Azurite and sovereign clouds. |
| Account Name and Key | The Account Name and one of its access keys. |
| SAS Token | The Account Name and a shared access signature token. You can also paste the whole SAS URL from the Azure portal: DBCode uses the token after the ?. |
| Microsoft Entra ID (Editor sign-in) | The Account Name. DBCode signs in with the Microsoft account you use in VS Code. |
| Microsoft Entra ID (Default credentials) | The Account Name. DBCode finds your credentials automatically, from sources such as a service principal in environment variables, a managed identity, or your Azure CLI sign-in. |
| Authentication profile | An authentication profile. An Azure Storage profile supplies the account and endpoint itself. A Microsoft Entra ID or command profile signs in to the Account Name you enter. |
The connection string, account key and SAS token are stored with DBCode’s password storage options.
To connect, DBCode lists the account’s queues, so any sign-in allowed to list queues can connect.
Endpoint
Section titled “Endpoint”Leave Endpoint blank to connect to the public Azure cloud at https://<account>.queue.core.windows.net.
A connection string, an account key or a SAS token works with any endpoint, including Azurite, sovereign clouds and private endpoints.
Microsoft Entra ID sign-in, and sign-in with a Microsoft Entra ID or command profile, connects over https to Azure Queue Storage endpoints, such as https://<account>.queue.core.windows.net or a private endpoint for it.
Other settings
Section titled “Other settings”- Message Encoding: Choose Base64 for queues whose messages are stored Base64-encoded, as Azure Functions queues commonly are. DBCode then decodes each message body that is Base64 of text, shows any other body as stored, and encodes the messages you add. The default, None, shows and adds bodies as plain text.
- Connection Timeout: How long DBCode waits for each request to Azure, retries included. It measures time spent talking to Azure; signing in is timed separately.
- Read Only: The connection browses queues and messages only. Creating, deleting and purging queues and adding messages are turned off.
Azure Queue Storage Features in DBCode
Section titled “Azure Queue Storage Features in DBCode”Browsing queues
Section titled “Browsing queues”The storage account appears as the connection’s database, with a Queues folder holding every queue. Each queue shows its approximate message count, as Azure reports it.
To find the queue you need:
- Search: Right-click the connection and choose Search to find queues by name. See Search.
- Filter by message count: Right-click the Queues folder, choose Filter and filter by row count. Hide empty (rows > 0) shows only the queues holding messages, and Minimum rows… shows the queues holding at least the number you enter. See Filter.
Refresh a queue or the Queues folder to update the counts.
You can also list the queues with their counts from a file or notebook connected to the storage account. QUEUES and LIST are the two commands DBCode runs there, and they do the same thing:
QUEUESLISTAny other command is answered with an error that names these two.
Opening a queue
Section titled “Opening a queue”Click a queue to open it in the data grid. A queue opens showing its first 32 messages, from the front of the queue, with these columns:
| Column | Contents |
|---|---|
| Message ID | The ID Azure assigned to the message |
| Inserted | When the message was added |
| Expires | When the message expires |
| Dequeue Count | How many times a consumer has received the message |
| Body | The message text |
DBCode peeks at the messages, so they stay in the queue exactly as they were: consumers still receive them, and their dequeue counts are unchanged. Choose Open with limit… to show fewer messages. You can export the messages shown, as with any grid.
Live view
Section titled “Live view”Watching a queue live is a Pro feature: click Go Live on an opened queue to start it (with a Pro subscription the queue goes live as soon as you open it). DBCode then checks the queue for new messages every 3 seconds and adds them to the grid. See Streaming.
The live view reads the front of the queue, the same 32 messages a queue opens with. New messages appear once they are among the first 32, so on a busy queue they show up as consumers work through the messages ahead of them. A brief network or service problem is retried on the next check. If the queue is deleted or access is refused, the live view stops and shows the error.
Adding messages
Section titled “Adding messages”Add a row in the data grid, type the message in the Body column, and save. Azure assigns the message ID, times and dequeue count. A message body can be up to 64 KiB once encoded.
Creating, purging and deleting queues
Section titled “Creating, purging and deleting queues”- Create: Right-click the Queues folder and choose Create, then enter a name. A queue name is 3 to 63 characters of lowercase letters, digits and single hyphens, and starts and ends with a letter or digit. A name already in use by another queue is refused.
- Purge: Right-click a queue and choose Truncate to remove all of its messages. The queue stays. On a very large queue, Azure clears the messages in stages, and DBCode repeats the clear until the queue is empty, up to 10 times. If messages remain after that, DBCode tells you the queue was partly cleared, and running Truncate again clears the rest.
- Delete: Right-click a queue and choose Drop to delete it along with its messages. A queue someone already deleted elsewhere counts as deleted, so deleting a selection of queues carries on to the rest.
DBCode asks you to confirm before it purges or deletes. To reset an environment, select several queues in the explorer and choose Truncate or Drop: you confirm once for the whole selection, and each queue is listed in the DBCode output panel as it is done.
For more information about Azure Queue Storage, visit learn.microsoft.com.