简体   繁体   中英

process azure queue based on timer and on queue length

I want to run a function when my azure queue reaches x length or has not been looked at for y minutes. ie: I have a queue myQueue, which a webhook is adding messages to. I want to process the queue if it reaches X messages in length or if it hasn't been processed for Y minutes (this is incase there are less than X messages sat in queue). Am I missing something obvious? I can see queue triggers, but that is for every message that enters queue (I think?) or timer triggers that will do my time part but not a mix. Any ideas?

The Queue Trigger is to trigger a function whenever a message arrives into a queue. There's no 'batch' queue trigger, so you either work with a time trigger that runs every x seconds and check for the queue length and start processing, or you live with the original queue trigger.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM