Skip to content

MapHub extension with custom hub hame #63791

@greggnog

Description

@greggnog

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.

I am trying to set up local development using an Azure Signalr instance in a way where developer APIs that handle incoming SignalR requests don't interfere with each other. I had the same issue with Azure Web Pubsub and it was addressed there with this PR (in response to a feature request): Azure/azure-sdk-for-net#47022

I tried using unique paths per machine when registering the hub (e.g. "/hub1", "/hub2"), but there was still interference.

Describe the solution you'd like

Adding extension method for specifying custom hub name:

public void Configure(IApplicationBuilder app)
{
    app.UseEndpoints(endpoint =>
    {
        endpoint.MapHub<SampleHub>("/sampleHubPath", "customHubName");
    });
}

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-signalrIncludes: SignalR clients and servers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions