Event Hub Live Explorer is a Blazor-based frontend for interacting with Azure Event Hubs. It provides a streamlined interface for both sending and receiving events in real time, making it a valuable tool for local development, testing, and diagnostics.
Built with .NET Aspire in mind, it integrates smoothly into Aspire dashboards and enhances the developer experience when working with event-driven systems.
- 📤 Send messages directly to Event Hubs with JSON validation and formatting
- 📥 Read events from multiple partitions in real time
- 🔍 Search and filter messages by content or partition ID
- 📋 Copy and inspect messages with syntax-highlighted JSON detail view
- 📊 Partition distribution chart to visualize message spread across partitions
- 📈 Throughput indicator showing message count and messages per second
- 📥 Export messages as JSON or CSV
- 🛠️ Integrates with .NET Aspire
- 🧪 Ideal for local development and testing of event-based systems
Install NuGet package LupusBytes.Aspire.Hosting.Azure.EventHubs.LiveExplorer in your Aspire AppHost project.
dotnet add package LupusBytes.Aspire.Hosting.Azure.EventHubs.LiveExplorervar explorer = builder.AddAzureEventHubsLiveExplorer();var eventHub = builder
.AddAzureEventHubs("event-hub-namespace").RunAsEmulator()
.AddHub("event-hub");
explorer.WithReference(eventHub);This makes the Event Hub Live Explorer connect to the Event Hub, using the $Default consumer group.
var eventHubWithCustomConsumerGroup = eventHub.AddConsumerGroup("explorer");
explorer.WithReference(eventHubWithCustomConsumerGroup)To reduce boilerplate, a convenience method exists to reference all Event Hubs and create consumer groups on them (if they don’t already exist):
builder
.AddAzureEventHubs("event-hub-namespace").RunAsEmulator()
.AddEventHub("event-hub1")
.AddEventHub("event-hub2")
.AddEventHub("event-hub3")
.AddEventHub("event-hub4");
explorer.WithAutoReferences(consumerGroupName: "explorer");This will scan the application model for Azure Event Hub resources and add them as references using the provided consumer group.
⚠️ This method must be called after every desired Azure Event Hub has already been added to the application model. Azure Event Hubs added after invocation of this method will not be referenced!
