Using the template to create a azure function, one can create function only listening to particular pair of azure topic/subscription:
{
"bindings": [
{
"name": "mySbMsg",
"type": "serviceBusTrigger",
"direction": "in",
"topicName": "ftopic1",
"subscriptionName": "mysub",
"connection": "collosysazfuncsb_RootManageSharedAccessKey_SERVICEBUS",
"accessRights": "Manage"
}
],
"disabled": false
}
and then in run.csx you just receive the message
public static void Run(string message, TraceWriter log)
{
log.Info($"message: {message}");
}
Is there a way to listen to any topic/subscription using azure function and then receive topicName & subscriptionName as parameters in Run
method.
Doing topic-name as * does not help, and also it does not provide topic-name in Run
.