Reputation: 406
I am developing a queue triggered azure function. Also I am very new to it. Following is the configuration of my "function.json" file:
{
"disabled": false,
"bindings": [
{
"name": "myQueueItem",
"type": "queueTrigger",
"direction": "in",
"queueName": "testqueue-1",
"connection": "MyQueueTriggeredConnectionString"
}
]
}
My function is working fine. It is triggered for all entries in "testqueue-1" queue.
now I have few questions:
Can I give multiple queue name in "queueName" parameter?
Can I give some naming pattern in "queueName" paramener. Like we can give pattern in "path" parameter in blob triggered function: "path": "input/{name1}~123~{name2}"
If I do 10 entries in my queue. Will all entries execute simultaneously? or one by one? If it is simultaneously, How can I make it one by one?
Also if possible. please share some useful links that can help me to understand queue triggered azure in better way.
Thanks,
Upvotes: 0
Views: 648
Reputation: 1995
Although the question is not super elaborate I will try to answer what I think you want to know;
Can I give multiple queue name in "queueName" parameter? No. And it really doesn't seem to make a lot of sense to have for example two queues trigger the same function. Why not just define a parameter on your queue message to define the client? For example a jSON? Otherwise you will have to be creating queues for each client. What a nightmare.
Can I give some naming pattern in "queueName" parameter. Like we can give pattern in "path" parameter in blob triggered function: "path": "input/{name1}~123~{name2}" No. Once again that's not what queue binding is for. Pass parameters on the message.
If I do 10 entries in my queue. Will all entries execute simultaneously? or one by one? If it is simultaneously, How can I make it one by one? You can define this on your host.json file. Check the documentation here: https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json
If you want to make it one by one you can define singleton or, although still not fully supported, set WEBSITE_MAX_DYNAMIC_APPLICATION_SCALE_OUT to 1 in you application settings.
Upvotes: 3