Skip to content
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

Allow specifying a default EntityPath for Azure Event Hubs / Azure Service Bus connection string #7093

Open
1 task done
oising opened this issue Jan 13, 2025 · 2 comments · May be fixed by #7105
Open
1 task done
Assignees
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure Issues associated specifically with scenarios tied to using Azure azure-eventhubs Issues related to Azure Event Hubs integration
Milestone

Comments

@oising
Copy link
Contributor

oising commented Jan 13, 2025

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Can we add support for setting an EntityPath in the connection string now that the application model is stable. Having to set the EventHubName via the settings callback for integrations is bothersome.

Describe the solution you'd like

An API extension like the following seems the least intrusive:

builder.AddAzureEventHubs("ns").WithHub("hub", configure => configure.IsDefaultEntity = true);

...would result in the following connectionstring being available to integrations:

Endpoint=sb://<NamespaceName>.servicebus.windows.net/;SharedAccessKeyName=<KeyName>;SharedAccessKey=<KeyValue>;EntityPath=hub

Not setting a default entity should result in a connection string for the namespace only. The builder should throw [on build?] if more than one hub is set as default. I presume this should also work the same for ASB queues etc.

Additional context

No response

@eerhardt
Copy link
Member

cc @sebastienros

@davidfowl davidfowl added area-integrations Issues pertaining to Aspire Integrations packages azure Issues associated specifically with scenarios tied to using Azure azure-eventhubs Issues related to Azure Event Hubs integration labels Jan 14, 2025
@eerhardt eerhardt added azure Issues associated specifically with scenarios tied to using Azure and removed azure Issues associated specifically with scenarios tied to using Azure labels Jan 14, 2025
@davidfowl davidfowl added this to the 9.1 milestone Jan 14, 2025
@oising
Copy link
Contributor Author

oising commented Jan 14, 2025

I just threw up an initial PR for this -- have at it, @davidfowl @mitchdenny

I know this requires an API review officially, but I get the feeling you've had a dozen on this already internally. Maybe since the work is done, it will make the decision easier...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-integrations Issues pertaining to Aspire Integrations packages azure Issues associated specifically with scenarios tied to using Azure azure-eventhubs Issues related to Azure Event Hubs integration
Projects
None yet
4 participants