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

Dynamic Hubnames in Serverless SignalR Azure Functions #200

Open
agravity-philipp opened this issue Apr 7, 2021 · 1 comment
Open

Dynamic Hubnames in Serverless SignalR Azure Functions #200

agravity-philipp opened this issue Apr 7, 2021 · 1 comment

Comments

@agravity-philipp
Copy link

Hi,
I managed to get an dynamic hubname for negotiation in an azure functions of this extension. But failed to have a dynamic SignalRTrigger-Hubname inside InvocationContext.

Is there a reason why this is not supported?

/// Note that <see cref="SignalRTriggerAttribute"/> MUST use parameterless constructor in class based model.

Or how can I use a traditional class model in an static Serverless SignalR binding like SignalRTrigger to change the listening to a specific hubName?

Does this make sense anyway if I can just have ONE upstream Azure Function per SignalR server who handles the trigger?

Apologies for my ignorance... hope someone can enlighten me.

@zackliu
Copy link
Contributor

zackliu commented May 6, 2021

ServerlessHub uses the same convention as SignalR SDK, the class name is the hub name. In SignalR, Hub can be considered as a high-level isolation, different hubs usually have different methods and different logics. However, negotiation logic usually the same for different hubs.
Yes, can use traditional mode for SignalRTrigger. Please see https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-signalr-service-trigger?tabs=csharp#with-traditional-model

You said

Does this make sense anyway if I can just have ONE upstream Azure Function per SignalR server who handles the trigger?

I can't get your point. You can of cause setup more than one trigger functions per function app.

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

No branches or pull requests

2 participants