Test locally by using the Azure Event Hubs emulator
This article summarizes the steps to develop and test locally by using the Azure Event Hubs emulator.
Prerequisites
- Docker desktop
- Minimum hardware requirements:
- 2 GB of RAM
- 5 GB of disk space
- Windows Subsystem for Linux (WSL) configuration (only for Windows):
Note
Before you continue with the steps in this article, make sure Docker Desktop is operational in the background.
Run the emulator
To run the Event Hubs emulator, you can use an automated script or a Linux container:
Before you run an automated script, clone the emulator's GitHub installer repository locally.
Windows
Use the following steps to run the Event Hubs emulator locally on Windows:
Allow the execution of unsigned scripts by running this command in the PowerShell window:
$>Start-Process powershell -Verb RunAs -ArgumentList 'Set-ExecutionPolicy Bypass –Scope CurrentUser'
Run the setup script LaunchEmulator.ps1. Running the script brings up two containers: the Event Hubs emulator and Azurite (a dependency for the emulator).
Linux and macOS
To run the Event Hubs emulator locally on Linux or macOS:
- Run the setup script LaunchEmulator.sh. Running the script brings up two containers: the Event Hubs emulator and Azurite (a dependency for the emulator).
After the steps are successful, you can find the containers running in Docker.
Interact with the emulator
You can use the following connection string to connect to the Event Hubs emulator:
"Endpoint=sb://localhost;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=SAS_KEY_VALUE;UseDevelopmentEmulator=true;"
With the latest client SDK releases, you can interact with the emulator in various programming languages. For details, see Client SDKs.
To get started, refer to the Event Hubs emulator samples on GitHub.
Related content
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for