azure-storage-queues

Set nextVisibleTime in Azure Webjobs SDK

我怕爱的太早我们不能终老 提交于 2019-12-08 19:14:10
问题 I'm using Azure Webjobs to process messages from a queue. I saw that the Webjobs SDK processes any failed message again after 10 minutes, and it if fails 5 times it moves it to the poison queue (1). Also I can see the nextVisibleTime of the message in the queue, that is 10 minutes after the insertionTime (2). I want to use the AzureSDK error handling of the messages but I cannot wait 10 minutes for the message to be processed again. Is there any way I can set this nextVisibleTime to a few

How to read from multiple queues in real-world?

ぐ巨炮叔叔 提交于 2019-12-08 01:32:51
问题 Here's a theoretical question: When I'm building an application using message queueing, I'm going to need multiple queues support different data types for different purposes. Let's assume I have 20 queues (e.g. one to create new users, one to process new orders, one to edit user settings, etc.). I'm going to deploy this to Windows Azure using the 'minimum' of 1 web role and 1 worker role. How does one read from all those 20 queues in a proper way? This is what I had in mind, but I have little

Requeue or delete messages in Azure Storage Queues via WebJobs

最后都变了- 提交于 2019-12-07 16:31:24
问题 I was hoping if someone can clarify a few things regarding Azure Storage Queues and their interaction with WebJobs: To perform recurring background tasks (i.e. add to queue once, then repeat at set intervals), is there a way to update the same message delivered in the QueueTrigger function so that its lease (visibility) can be extended as a way to requeue and avoid expiry? With the above-mentioned pattern for recurring background jobs, I'm also trying to figure out a way to delete/expire a

Is this a good/preferable pattern to Azure Queue construction for a T4 template?

筅森魡賤 提交于 2019-12-07 14:31:25
问题 I'm building a T4 template that will help people construct Azure queues in a consistent and simple manner. I'd like to make this self-documenting, and somewhat consistent. First I made the queue name at the top of the file, the queue names have to be in lowercase so I added ToLower() The public constructor uses the built-in StorageClient API's to access the connection strings. I've seen many different approaches to this, and would like to get something that works in almost all situations.

Do Azure Functions triggered by storage queue take single message or all messages?

时光总嘲笑我的痴心妄想 提交于 2019-12-07 14:00:06
问题 If I create an Azure Function that is triggered by storage queue messages... will the system launch multiple parallel functions to reach each message from the queue or will a single function get called that reads in all available messages? In short, are queued messages handled individually or in batches? 回答1: API-wise your function will be called once per each individual message in the queue. But Azure Functions runtime will retrieve and process messages in batches, calling several instances

Azure Worker: Read a message from the Azure queue in a mutex way

泪湿孤枕 提交于 2019-12-07 13:59:41
问题 The run method of my worker role is: public override void Run() { Message msg=null; while (true) { msg = queue.GetMessage(); if(msg!=null && msg.DequeueCount==1){ //delete message ... //execute operations ... } else if(msg!=null && msg.DequeueCount>1){ //delete message ... } else{ int randomTime = ... Thread.Sleep(randomTime); } } } For performance tests I would that a message could be analysed only by a worker (I don't consider failure problems on workers). But seems by my tests, that two

Setting the VisibilityTimeout for a Message added to an Azure Queue via Azure Function Output Binding

你离开我真会死。 提交于 2019-12-07 05:42:32
问题 I have a TimerTrigger function and the Output binding is a Azure Queue. The idea is that every 10 minutes the timer will run, it will look at a view in my database and iterate through any rows returned adding them to the queue as messages. Below is my sample TimerTrigger. It worked fine adding messages to the Queue. However in my real world scenario some of the rows will require immediate execution while others will have a delay of some minutes (varies per row). I plan on handling the delay

How to read from multiple queues in real-world?

一曲冷凌霜 提交于 2019-12-06 11:15:14
Here's a theoretical question: When I'm building an application using message queueing, I'm going to need multiple queues support different data types for different purposes. Let's assume I have 20 queues (e.g. one to create new users, one to process new orders, one to edit user settings, etc.). I'm going to deploy this to Windows Azure using the 'minimum' of 1 web role and 1 worker role. How does one read from all those 20 queues in a proper way? This is what I had in mind, but I have little or no real-world practical experience with this: Create a class that spawns 20 threads in the worker

How to speed up Azure Storage Queue

不打扰是莪最后的温柔 提交于 2019-12-06 05:59:18
问题 I have tried everything I can think of to increase the speed of inserts. Which is really only a couple of things with no improvement. I have chunks of identifiers (Int64) that I need to send to a queue so that my multiple worker roles can work on it without having to worry about concurrency. I have tried a foreach loop (both with .ToString() and BitConverter.GetBytes() ): foreach(long id in ids) { queue.AddMessage(new CloudQueueMessage(id.ToString() /*BitConverter.GetBytes(id)*/)); } And a

Do Azure Functions triggered by storage queue take single message or all messages?

☆樱花仙子☆ 提交于 2019-12-06 03:04:30
If I create an Azure Function that is triggered by storage queue messages... will the system launch multiple parallel functions to reach each message from the queue or will a single function get called that reads in all available messages? In short, are queued messages handled individually or in batches? API-wise your function will be called once per each individual message in the queue. But Azure Functions runtime will retrieve and process messages in batches, calling several instances of your function in parallel. Fei Han First, as Mikhail said, Azure Functions runtime retrieve and process