A command-line tool for managing Azure Service Bus.
# Install from NuGet
dotnet tool install -g ServiceBusToolset
# Update to latest version
dotnet tool update -g ServiceBusToolset
# Install preview/alpha version
dotnet tool install -g ServiceBusToolset --prereleasegit clone https://github.com/kyurkchyan/ServiceBusToolset.git
cd ServiceBusToolset
dotnet build- .NET 10 SDK or later
- Azure CLI logged in (
az login)
| Command | Description |
|---|---|
| purge-dlq | Purge messages from a dead letter queue |
| resubmit-dlq | Resubmit messages from a dead letter queue back to the main queue |
| dump-dlq | Export DLQ messages to a JSON file |
| diagnose-dlq | Diagnose DLQ messages using Application Insights telemetry |
| monitor-queues | Monitor queue statistics in a live-updating console table |
| monitor-subscriptions | Monitor topic subscription statistics in a live-updating table |
# Purge all DLQ messages from a queue
sbtools purge-dlq -n mynamespace.servicebus.windows.net -q myqueue
# Interactive mode - select which message categories to purge
sbtools purge-dlq -n mynamespace.servicebus.windows.net -q myqueue -i
# Resubmit DLQ messages back to the main queue
sbtools resubmit-dlq -n mynamespace.servicebus.windows.net -q myqueue
# Interactive mode - select which message categories to resubmit
sbtools resubmit-dlq -n mynamespace.servicebus.windows.net -q myqueue -i
# Dump DLQ messages to a JSON file
sbtools dump-dlq -n mynamespace.servicebus.windows.net -q myqueue -o dlq-messages.json
# Interactive mode - select which message categories to dump
sbtools dump-dlq -n mynamespace.servicebus.windows.net -q myqueue -o dlq-messages.json -i
# Diagnose DLQ messages using Application Insights
sbtools diagnose-dlq -n mynamespace.servicebus.windows.net -q myqueue \
-a "/subscriptions/.../resourceGroups/.../providers/microsoft.insights/components/my-app-insights"
# Monitor all queues with live-updating table
sbtools monitor-queues -n mynamespace.servicebus.windows.net
# Monitor queues matching a pattern with 10-second refresh
sbtools monitor-queues -n mynamespace.servicebus.windows.net -f "order-*" -r 10
# Monitor all topic subscriptions
sbtools monitor-subscriptions -n mynamespace.servicebus.windows.net
# Monitor subscriptions for specific topics with subscription filter
sbtools monitor-subscriptions -n mynamespace.servicebus.windows.net -t "orders*" -s "*-processor"Note: If running from source instead of the global tool, replace
sbtoolswithdotnet run --in the commands above.
Uses DefaultAzureCredential. For
local development, run az login.
MIT