-
-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Azure EventHubs module #1183
base: develop
Are you sure you want to change the base?
feat: Add Azure EventHubs module #1183
Conversation
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
private readonly AzuriteContainer _azuriteContainer; | ||
|
||
private EventHubsContainer _eventHubsContainer; | ||
|
||
private readonly INetwork _network = new NetworkBuilder().WithName(NetworkName).Build(); | ||
|
||
private const string NetworkName = "eh-network"; | ||
private const string AzuriteNetworkAlias = "azurite"; | ||
|
||
private const string EventHubName = "testeventhub"; | ||
private const string EventHubConsumerGroupName = "testconsumergroup"; | ||
|
||
private EventHubsContainerTest() | ||
{ | ||
_azuriteContainer = new AzuriteBuilder() | ||
.WithNetwork(_network) | ||
.WithNetworkAliases(AzuriteNetworkAlias) | ||
.Build(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an idea still but due to EventHubs emulator will not work without Azurite then we can provide two ways to run EventHub Container implementation.
- Embed Azurite, so, users don't worry about it.
- Allow external Azurite in case users need a specific configuration
/cc @kiview WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does a pattern exist already ?
Also, please add documentation for the module. |
What does this PR do?
Microsoft released an emulator for EventHubs yesterday, see Azure/azure-service-bus#223 (comment)
This PR included a module for the emulator.
Info
You need to provide an Azurite (emulator) instance/endpoint to start the EventHub emulator. This can be done using the
EventHubsConfiguration
.You need to specify the following configuration file when starting the emulator.
It will be dynamically mapped and i have built a floating builder so that the user can set the configuration as easily as possible.
The namespace "emulatorNs1" is mandatory and it is the only one currently supported by the emulator.