Skip to content

feat: Add Event Hub Subscriber support#227

Merged
pm7y merged 4 commits into
masterfrom
event-hub-subscriber
Dec 21, 2025
Merged

feat: Add Event Hub Subscriber support#227
pm7y merged 4 commits into
masterfrom
event-hub-subscriber

Conversation

@pm7y
Copy link
Copy Markdown
Owner

@pm7y pm7y commented Dec 21, 2025

  • Add Azure Event Hub subscriber support, enabling events to be delivered to Event Hubs
  • Add Event Hub emulator to Docker Compose for local testing
  • Add rebuild script for Docker development workflow

Copilot AI review requested due to automatic review settings December 21, 2025 21:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Event Hub subscriber support to the Azure Event Grid Simulator, enabling events to be delivered to Azure Event Hubs alongside existing HTTP, Service Bus, and Storage Queue delivery mechanisms.

Key Changes:

  • Added Event Hub delivery service with connection pooling and proper resource disposal
  • Implemented comprehensive validation for Event Hub subscriber settings with support for topic-level connection string inheritance
  • Extended Docker compose setup to include Azure Event Hubs emulator for local testing

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Directory.Packages.props Added Azure.Messaging.EventHubs package dependency (v5.12.2)
src/AzureEventGridSimulator/Program.cs Registered EventHubEventDeliveryService and added subscriber logging on startup
src/AzureEventGridSimulator/Infrastructure/Settings/TopicSettings.cs Added Event Hub connection string and namespace credential properties for topic-level defaults
src/AzureEventGridSimulator/Infrastructure/Settings/Subscribers/SubscribersSettingsConverter.cs Extended JSON converter to support eventHub array deserialization
src/AzureEventGridSimulator/Infrastructure/Settings/Subscribers/SubscribersSettings.cs Added EventHub property and EventHubSubscribers enumerable to subscriber collection
src/AzureEventGridSimulator/Infrastructure/Settings/Subscribers/EventHubSubscriberSettings.cs New settings class with validation, connection string inheritance, and effective connection string resolution
src/AzureEventGridSimulator/Infrastructure/Settings/SimulatorSettings.cs Added parent topic assignment for Event Hub subscribers during validation
src/AzureEventGridSimulator/Domain/Services/Retry/RetryDeliveryBackgroundService.cs Added DeliverToEventHubAsync method for retry delivery support
src/AzureEventGridSimulator/Domain/Services/Delivery/EventHubEventDeliveryService.cs New delivery service implementing event serialization, producer client pooling, and Event Hub message sending
src/AzureEventGridSimulator/Domain/Entities/DeliveryOutcome.cs Added EventHubError outcome type
src/AzureEventGridSimulator/Domain/Commands/SendNotificationEventsToSubscriberCommandHandler.cs Added debug logging for all subscriber types
src/AzureEventGridSimulator/AzureEventGridSimulator.csproj Added package reference for Azure.Messaging.EventHubs
src/AzureEventGridSimulator.Tests/appsettings.test.json Updated test configuration to use new grouped subscriber format with Event Hub example
src/AzureEventGridSimulator.Tests/UnitTests/Subscribers/Validation/EventHubSubscriberSettingsValidationTests.cs Comprehensive validation tests covering all authentication scenarios and error cases
src/AzureEventGridSimulator.Tests/UnitTests/Subscribers/Delivery/EventHubEventDeliveryServiceTests.cs Unit tests for delivery service covering schema formatting, property resolution, and error handling
src/AzureEventGridSimulator.Tests/UnitTests/Configuration/ConfigurationLoadingTests.cs Added test for Event Hub subscriber deserialization via IConfiguration binding
docker/rebuild.ps1 New PowerShell script for rebuilding Docker Compose stack
docker/eventhub-config.json Configuration file for Azure Event Hubs emulator
docker/docker-compose.yml Added Event Hubs emulator service with Azurite dependency
docker/appsettings.docker.json Added Event Hub subscriber example configuration
README.md Updated documentation with Event Hub subscriber settings, examples, and emulator information
AGENTS.md Updated developer documentation to include Event Hub support and configuration examples

@pm7y pm7y merged commit c164b62 into master Dec 21, 2025
9 checks passed
@pm7y pm7y deleted the event-hub-subscriber branch December 21, 2025 21:51
@github-actions github-actions Bot mentioned this pull request Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants