azure-queues

How to access Azure storage queue by JavaScript

。_饼干妹妹 提交于 2019-12-04 18:09:13
For our testing purpose, we would like to access Azure storage queue directly with JavaScript instead of preparing a new web service. Is this possible? What should we do to achieve this, since I cannot find the official documentation for JavaScript API of Azure storage. Yes, it is certainly possible. In fact, I am currently developing a service which does exactly this. Step 1: Enable CORS for Queue Service To accomplish this, first you need to enable CORS settings on your Queue Service. You may find this blog post useful for CORS settings: http://blogs.msdn.com/b/windowsazurestorage/archive

How does one determine if all messages in an Azure Queue have been processed?

荒凉一梦 提交于 2019-12-04 14:02:48
I've just begun tinkering with Windows Azure and would appreciate help with a question. How does one determine if a Windows Azure Queue is empty and that all work-items in it have been processed? If I have multiple worker processes querying a work-item queue, GetMessage(s) returns no messages if the queue is empty. But there is no guarantee that a currently invisible message will not be pushed back into the queue. I need this functionality since follow-up behavior of my workflow depends on completion of all work-items in that particular queue. A possible way of tackling this problem would be

How to Create Queue in Windows Azure?

家住魔仙堡 提交于 2019-12-03 21:57:51
I am using below code to create queue, using SharedSecretTokenProvider . However I am not able to supply correct values of managerName & managerKey value form windows azure portal. This results in Http 401 Unauthorized exception. How do I resolve this error? const string queueName = "thequeue"; var tokenProvider = TokenProvider.CreateSharedSecretTokenProvider( ConfigurationManager.AppSettings["managerName"], ConfigurationManager.AppSettings["managerKey"]); Uri uri = ServiceBusEnvironment.CreateServiceUri("http", "MyNamespace" , string.Empty); NamespaceManager namespaceManager = new

Azure Queue Peek All Messages

二次信任 提交于 2019-12-02 16:30:05
问题 I understand that Azure Queue is not strict FIFO. And Visual Studio Server Explorer shows only 32 messages. I have some 88 messages in the queue. Is it possible to peek through all the messages in an Azure queue with out dequeing any of it? 回答1: Simple answer to your question is "No, you can't do that". Reason being Peeking at messages does not alter their visibility so unless your messages are being dequeued by some other process, repeated peeking will return same messages. Only alternative

Limiting the number of concurrent jobs on Azure Functions queue

痴心易碎 提交于 2019-12-02 00:47:09
问题 I have a Function app in Azure that is triggered when an item is put on a queue. It looks something like this (greatly simplified): public static async Task Run(string myQueueItem, TraceWriter log) { using (var client = new HttpClient()) { client.BaseAddress = new Uri(Config.APIUri); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); StringContent httpContent = new StringContent(myQueueItem, Encoding.UTF8, "application/json"); HttpResponseMessage

Limiting the number of concurrent jobs on Azure Functions queue

主宰稳场 提交于 2019-12-01 20:39:31
I have a Function app in Azure that is triggered when an item is put on a queue. It looks something like this (greatly simplified): public static async Task Run(string myQueueItem, TraceWriter log) { using (var client = new HttpClient()) { client.BaseAddress = new Uri(Config.APIUri); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); StringContent httpContent = new StringContent(myQueueItem, Encoding.UTF8, "application/json"); HttpResponseMessage response = await client.PostAsync("/api/devices/data", httpContent); response.EnsureSuccessStatusCode(

Azure Service Bus and Messaging Sessions

痴心易碎 提交于 2019-12-01 02:57:15
I've been looking into Azure Service Bus Queues ( NOT Azure Storage Queues). All of the details that I have read indicate that it supports FIFO semantics , but only in the context of a "Messaging Session". The problem is that I can't seem to find any information on what exactly this is in the context of Azure. Is this a WCF construct, or something that is particular to Azure Service Bus? I assume that it does not relate to local transactions, but I am not 100% sure. Any pointers would be very helpful. Thanks! Jim O'Neil Specifically it refers to MessageSession , and it's the

QueueTrigger Attribute Visibility Timeout

跟風遠走 提交于 2019-11-29 11:01:26
If I were to get a message from queue using Azure.Storage.Queue queue.GetMessage(TimeSpan.FromMinutes(20)); I can set the visibility timeout, however when trying to use Azure.WebJobs (SDK 0.4.0-beta) attributes to auto bind a webjob to a queue i.e. public static void ProcessQueueMessage([QueueTrigger("myqueue")] string message){ //do something with queue item } Is there a way to set the visibility timeout on the attribute? There does not seem to be an option in JobHostConfiguration().Queues. If there is no way to override, is it the standard 30 seconds then? In the latest v1.1.0 release, you

Writing a listner to Azure Queue

独自空忆成欢 提交于 2019-11-29 07:45:00
I have seen most queue example as the polling mechanism . Is it possible to change it to listner of the queue. Because polling may affect the performance of the worker. MikeWo Both Windows Azure Storage Queues and Windows Azure Service Bus Queues utilize polling and do not have a notification feature per se; however, Windows Azure Service Bus Queues do support long polling which is as close to a notification approach as you can get currently. When you use the Receive method from MessageReceiver it will use long polling (meaning it will request a message and if there isn't one in the queue the

Determining how many messages are on the Azure Service Bus Queue

守給你的承諾、 提交于 2019-11-28 08:58:56
I know there is a way to determine the number of messages (or approximate number) in the Azure Queue (Store Account); however is there a way to query for the number of pending messages on an Azure Service Bus queue? var nsmgr = Microsoft.ServiceBus.NamespaceManager.CreateFromConnectionString(connectionString); long count = nsmgr.GetQueue(queueName).MessageCount; Katsifaris It is called MessagesCountDetails.ActiveMessageCount. It returns the number of the Active Messages in the Queue. You probably have some Dead letter messages: var msg = Microsoft.ServiceBus.NamespaceManager