Skip to content

Expose Endpoint Name as a read-only property on EndpointConfiguration#7698

Merged
danielmarbach merged 3 commits into
masterfrom
endpoint-name
Apr 15, 2026
Merged

Expose Endpoint Name as a read-only property on EndpointConfiguration#7698
danielmarbach merged 3 commits into
masterfrom
endpoint-name

Conversation

@danielmarbach
Copy link
Copy Markdown
Contributor

@danielmarbach danielmarbach commented Apr 14, 2026

This pull request exposes the endpoint name as a get-only property on the EndpointConfiguration.

While the endpoint name can already be retrieved using:

endpointConfiguration.GetSettings().EndpointName()

providing direct access through the configuration offers additional value and improves usability.

Motivation

  1. Improved support for multi-hosting scenarios
    Exposing the endpoint name as a property allows the EndpointConfiguration to serve as the sole information carrier. This is particularly useful when the endpoint name is used as an identifier for keyed services.

  2. Enhanced developer experience
    Accessing the endpoint name directly is more intuitive, discoverable, and expressive than retrieving it through settings.

  3. Simplified integrations
    This change streamlines registrations and bindings for the new Functions integration, reducing complexity and boilerplate.

@danielmarbach danielmarbach added this to the 10.2.0 milestone Apr 14, 2026
@danielmarbach danielmarbach self-assigned this Apr 14, 2026
@danielmarbach danielmarbach changed the title Expose the endpoint name as a get-only property on endpoint configuration Expose Endpoint Name as a Read-Only Property on EndpointConfiguration Apr 14, 2026
@danielmarbach danielmarbach changed the title Expose Endpoint Name as a Read-Only Property on EndpointConfiguration Expose Endpoint Name as a read-only property on EndpointConfiguration Apr 14, 2026
@danielmarbach
Copy link
Copy Markdown
Contributor Author

I looked at the internal usage of the endpoint name and concluded it is not useful to try to use the property directly because Core internals never use EndpointConfiguration directly, and it seems excessive and not useful trying to change that.

Comment thread src/NServiceBus.Core/SettingsExtensions.cs

return receiveConfiguration.LocalQueueAddress.BaseAddress;
/// <summary>
/// Returns the shared queue name of this endpoint.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shared == "input queue" right?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I took it as not-the-instance-specific-with-discriminator one but I don't know what you call that with better words. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants