IMPORTANT NOTE: This project was initially designed as a temporary solution (based on AI-generated code) to view messages in the Azure Service Bus Emulator until either the emulator supports the management API or Service Bus Explorer adds support for the emulator. There are no plans for long-term support/maintenance of this project.
Service Bus Viewer is a web application for viewing and interacting with Azure Service Bus queues and topics.
The main goal of this application is to support local development and testing using a Service Bus Emulator.
For more information on running and configuring the Azure Service Bus Emulator, see:
- Connect to any Service Bus instance using a connection string.
- Peek and receive messages from queues or topics.
- View message details and properties.
- Send messages to queues or topics.
You can use the container image from the GitHub Container Registry to run the Service Bus Viewer with Docker:
docker run --name ServiceBusViewer -p 5000:8080 -d ghcr.io/veselovandrey/servicebusviewer:latestOr with Podman:
podman run --name ServiceBusViewer -p 5000:8080 -d ghcr.io/veselovandrey/servicebusviewer:latestUse the provided Dockerfile to build the Service Bus Viewer image. Run the build command from the solution directory (where the solution file is located):
With Docker:
docker build -f ServiceBusViewer/Dockerfile -t servicebusviewer .Or with Podman:
podman build -f ServiceBusViewer/Dockerfile -t servicebusviewer .You can provide the Service Bus connection string via CONNECTION_STRING. Examples:
Docker:
docker run --name ServiceBusViewer -p 5000:8080 \
-e CONNECTION_STRING="Endpoint=sb://host.docker.internal;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;" \
-d servicebusviewerPodman:
podman run --name ServiceBusViewer -p 5000:8080 \
-e CONNECTION_STRING="Endpoint=sb://host.docker.internal;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;" \
-d servicebusviewerIf CONNECTION_STRING is not set, the app falls back to its built-in development emulator connection string.
To run the Service Bus Viewer from source, you need to have the following prerequisites installed:
- .NET SDK 9.0 or later
Navigate to the project directory and use
dotnet runto restore dependencies and start the application.
- Use the
localhostaddress when running the emulator on the same host as the viewer.
Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;
- Use
host.docker.internalto connect from a container to a Service Bus emulator running on the host machine.
Endpoint=sb://host.docker.internal;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;
- Use the host machine's network address when connecting from a container to a Service Bus emulator running on the host.
- Use the service name defined in your
docker-compose.yamlwhen both the emulator and Service Bus Viewer are running in containers on the same network. - Use the connection string from the Azure Portal for cloud Azure Service Bus instances (but it is recommended to use Service Bus Explorer or the Azure Portal built-in tool to work with cloud resources).
Hint: add port to the connection string if needed, e.g. if you are running multiple Service Bus emulators on the same host, use
Endpoint=sb://localhost:[PORT];SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;
Endpoint=sb://host.docker.internal:[PORT];SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;