During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in
Event Hubs Emulator
Azure Event Hubs is a data streaming service for ingesting large volumes of events - such as telemetry or clickstreams - which any number of consumers can then read, each at their own pace.
Locally supports both provisioning Event Hubs namespaces (and the hubs and consumer groups within them) and sending and receiving events - so you can fully test your producers and consumers against it.
When you provision a namespace in Locally, it's available at <namespace>.eventhub.locally - over AMQP on port 5671 and HTTPS on 5662 - which you can connect to using the Azure Event Hubs SDKs and the Azure CLI.
For a step-by-step walkthrough, see Provisioning an Event Hubs Namespace.
Finding the Emulator
Once a namespace has been created, you can find its endpoints on its resource page within the Locally Dashboard - the AMQP Endpoint to copy, and an HTTPS Endpoint which opens the emulator:
You can also open the emulator from the command line using locally eventhub dashboard --namespace <namespace>.
The Event Hubs Emulator
Within the Event Hubs Emulator you can see each hub's partitions - with their first and last sequence numbers, and how many events they hold - browse a partition's events, and find the connection strings to interact with the namespace:
You can also send events from the browser, and Pause a hub to see how your consumers behave when nothing arrives.
What's Supported
The Event Hubs emulator supports:
Authentication is supported using either a Microsoft Entra token (with the Azure Event Hubs Data Sender or Azure Event Hubs Data Receiver role), over both AMQP and HTTPS, or the namespace's shared access policies. The Schema Registry uses its own roles: Schema Registry Reader to read schemas, and Schema Registry Contributor to register or delete them.
Owner levels are supported, so the EventProcessorClient can share partitions between instances - and a hub that's Disabled, SendDisabled or ReceiveDisabled refuses sends or receives accordingly.
Chaos Engineering (on the Team plan) can throttle, fail or slow down requests over both HTTPS and AMQP, including on connections that are already open - delaying, dropping, repeating or reordering events, or reporting a hub as disabled or over its quota.
Event Hubs also works with Locally's other emulators, as you'd expect - for example:
- The IoT Hub Emulator's built-in endpoint is an Event Hub, so device telemetry can be read using the same SDKs.
- Event Grid subscriptions can deliver events to an Event Hub.
- Capture archives a hub's events to the Storage Emulator, and sends an Event Grid event for each file it writes.
Capture
An Event Hub with Capture enabled archives its events to a blob container in a Storage Account within Locally. Each partition is captured separately, and a new file is written whenever the time interval or size limit is reached, whichever comes first.
Capture files use Azure's Avro format and schema, so your existing readers work as-is. They're named using the destination's archiveNameFormat (Azure's default is {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}), and each new file sends a Microsoft.EventHub.CaptureFileCreated event to Event Grid.
By default, files are written using the Storage Account's key. If the destination is set to use one of the namespace's managed identities (system- or user-assigned), that's used instead, and it needs the Storage Blob Data Contributor role on the account.
Note
EventHubArchive.AzureBlockBlob); Data Lake Storage Gen1 has been retired and isn't supported.Differences from Azure
As of Locally v2026.11.03, the Event Hubs emulator has the following differences from Azure:
- There's no Kafka endpoint.
- Capture checks its windows every 5 seconds, so a file can be written up to 5 seconds after its window closes.
- Idempotent publishing isn't supported, so a retried send isn't deduplicated.
- A partition key always lands on the same partition, but not necessarily the same one it would in Azure.
- A hub's status is read when a link is opened, so a link that's already open doesn't see a later change.
- Retention is time-based only - there's no size limit, and an expired event can still be read for up to 30 seconds.
- The Schema Registry can't list a schema's versions or fetch one by name and version, and doesn't validate schemas.
Should you encounter any issues, please take a look at the troubleshooting section, reach out in our Discord or open an issue and we'll take a look.
During Public Preview you can use the Team plan for free, and get an early-adopter discount at GA. Sign in