Azure / azure-service-bus-emulator-installer

This repository acts as a central hub for handling issues, collecting feedback, and facilitating discussions related to the Azure Service Bus Emulator.
https://learn.microsoft.com/en-us/azure/service-bus-messaging/overview-emulator
MIT License
100 stars 2 forks source link

Event-Hubs Logo Azure Service Bus Emulator Installer

This repository contains the scripts required to install and run the Azure Service Bus Emulator.

About Azure Service Bus

Azure Service Bus is a fully managed enterprise message broker offering queues and publish-subscribe topics. It decouples applications and services, providing benefits like load-balancing across workers, safe data and control routing, and reliable transactional coordination. Read more here.

About Azure Service Bus emulator

The Azure Service Bus emulator offers a local development experience for the Service bus service. You can use the emulator to develop and test code against the service in isolation, free from cloud interference.

[!CAUTION] Emulator is intended solely for development and testing scenarios.Any kind of Production use is strictly discouraged. There is no official support provided for Emulator. Any issues/suggestions should be reported via GitHub issues on GitHub project.

Run Azure Service Bus Emulator

This section summarizes the steps to develop and test locally with Service Bus Emulator. To read more about Service Bus, read here.

Prerequisites

[!NOTE] Before you continue with the subsequent steps, make sure Docker Engine is operational in the background.

Running the Emulator

This section highlights different steps to run Service Bus Emulator. Details are as follows:

Using Automated Script

Before running automated script, clone the installation repository locally.

Windows

After completing the prerequisites, you can proceed with the following steps to run the Service Bus Emulator locally.

  1. Before executing the setup script, we need to allow execution of unsigned scripts. Run the below command in the PowerShell window:

$>Start-Process powershell -Verb RunAs -ArgumentList 'Set-ExecutionPolicy Bypass –Scope CurrentUser’

  1. Execute setup script LaunchEmulator.ps1. Running the script would bring up two containers – Service Bus Emulator & Azure SQL Edge (dependency for Emulator)

Linux & macOS

After completing the prerequisites, you can proceed with the following steps to run the Service Bus Emulator locally.

  1. Execute the setup script LaunchEmulator.sh . Running the script would bring up two containers – Service Bus Emulator & Azure SQL Edge (dependency for Emulator)

  2. Execute the same script LaunchEmulator.sh with the option --compose-down=Y to issue a docker compose down to terminate the containers.

LaunchEmulator.sh --compose-down=Y

Using Docker Compose (Linux Container)

You can also spin up Emulator using Docker Compose file directly. Refer here for details:

Once the steps are successful, Emulator compose set can be found running in Docker.

test-locally-with-service-bus-emulator

Interact with the emulator

By default, emulator uses config.json configuration file. You can configure entities by making changes to configuration file. To know more, visit make configuration changes.

[!NOTE] Service Bus emulator isn't compatible with the community owned open source Service Bus Explorer

You can use the following connection string to connect to the Service Bus emulator:

You can use the latest client SDKs to interact with the Service Bus emulator across various programming languages. To get started, refer to the Service Bus emulator samples on GitHub.

Support

There is no official support provided for Emulator.Any issues/suggestions should be reported via GitHub issues on installation repo.

License

The scripts and documentation in this project are released under the MIT License.

The software (Azure Service Bus Emulator and Sql Edge) that the scripts in this repository install are licensed under separate terms. Refer to the terms governing each software below: