A simulator that provides HTTPS endpoints to
mimic Azure Event Grid topics and subscribers. Compatible with
the Microsoft.Azure.EventGrid client library and supports both EventGrid and CloudEvents v1.0 schemas.
Note: This simulator is intended for local development and testing only.
# Global install
dotnet tool install -g AzureEventGridSimulator
azure-eventgrid-simulator
# Or local install
dotnet new tool-manifest
dotnet tool install AzureEventGridSimulator
dotnet tool run azure-eventgrid-simulatordocker pull pmcilreavy/azureeventgridsimulator:latestDownload from GitHub Releases.
For an improved local development experience with Azure emulators and built-in observability, use .NET Aspire:
cd src
dotnet run --project AzureEventGridSimulator.AppHostThis starts the simulator along with Azure Storage (Azurite), Service Bus, Event Hubs, and SQL Server emulators. The Aspire Dashboard provides distributed traces, logs, and metrics.
See the Aspire wiki page for details.
Create an appsettings.json file:
{
"topics": [
{
"name": "MyTopic",
"port": 60101,
"key": "TheLocal+DevelopmentKey=",
"subscribers": [
{
"name": "MySubscriber",
"endpoint": "http://localhost:7071/api/MyFunction",
"disableValidation": true
}
]
}
]
}Run the simulator, then post events:
curl -k -X POST "https://localhost:60101/api/events?api-version=2018-01-01" \
-H "Content-Type: application/json" \
-H "aeg-sas-key: TheLocal+DevelopmentKey=" \
-d '[{"id":"1","subject":"/test","eventType":"Test","eventTime":"2024-01-01T00:00:00Z","data":{"message":"Hello"},"dataVersion":"1"}]'Access the built-in dashboard at https://localhost:<port>/dashboard to view event history and delivery status.
For detailed documentation, see the Wiki:
- Configuration - Topics, subscribers, and app settings
- HTTP Subscribers - Webhook configuration
- Service Bus Subscribers - Azure Service Bus
- Storage Queue Subscribers - Azure Storage Queues
- Event Hub Subscribers - Azure Event Hubs
- Filtering - Event filtering
- Retry and Dead-Letter - Retry policies
- Dashboard - Web-based monitoring
- Docker - Container deployment
- Schema Support - EventGrid and CloudEvents
- Architecture - System design and internals
See the Architecture page for system design details and the Wiki for development guidelines.
This is a small project but has seen steady growth over time. Thank you to everyone who has starred the repository!