azure-queues

How to send queue message from Windows Phone?

99封情书 提交于 2019-12-11 09:03:35
问题 I'm using the Windows Azure toolkit for Windows Phone, but I have difficulities to send a queue message to the cloud service. Here is my code: public void SendQueueMessage(string queueReference, params string[] message) { CloudQueue cloudQueue = new CloudQueue(); CloudQueueClient queueClient = new CloudQueueClient(queueUri, credentials); queueClient.GetQueueReference(queueReference); StringBuilder sb = new StringBuilder(); foreach (var messagePart in message) { sb.Append(messagePart); sb

ensuring no more than N instances are scaled out for a specific queue

一曲冷凌霜 提交于 2019-12-11 07:45:59
问题 My function is sending a payload to different sftp servers. Those servers are limited in how many connections they can accept. I need a solution to throttle our connections to those servers. The function is triggered by storage queues, and the first draft of the design is: I then learned that you can only have 1 trigger per function, which led me to sandwhich another aggregating queue: I can set the batchSize/newBatchThreshold on the originating queues, but I'm not certain this will work

Azure WebJobs: Queue triggers with different batch sizes

陌路散爱 提交于 2019-12-11 07:04:54
问题 I have a WebJob on azure that processes messages from multiple queues at the same time: public async static Task ProcessQueueMessage1([QueueTrigger("queue1")] string message) { switch (message.Substring(message.Length - 3, 3)) { case "tze": await Parser.Process1(message); break; default: break; } } public async static Task ProcessQueueMessage2([QueueTrigger("queue2")] string message) { switch (message.Substring(message.Length - 3, 3)) { case "tzr": await Parser.Process2(message); break;

Asynchronously posting to Azure Queues

核能气质少年 提交于 2019-12-07 06:13:55
问题 I try to enqueue messages in Azure Queues asynchronously like this: private async Task EnqueueItemsAsync(IEnumerable<string> messages) { var tasks = messages.Select(msg => _queue.AddMessageAsync(new CloudQueueMessage(msg), null, null, null, null)); await Task.WhenAll(tasks); } If I get it right this says "start enqueuing one item after the other without waiting them to get posted, keep a reference for each task and then wait until all get posted". This code works fine in most cases, but for a

Azure Function used to write to queue - can I set metadata?

六月ゝ 毕业季﹏ 提交于 2019-12-07 05:06:45
问题 I can see from this page that you can access a queue message metadata properties simply enough when they are used as a trigger, but I want to do the opposite. I have an Azure function which writes messages to a queue, but it current has the default Expiration Time and I want to set a much shorter expiration time so they only live on the queue for a very short period. Is there a way when writing the message to the queue from the Azure Function to set the Expiration time? Thanks EDIT 1: One

The type or namespace name 'ServiceBus' does not exist in the namespace 'Microsoft'

两盒软妹~` 提交于 2019-12-07 00:33:38
问题 I'm trying to make a C# console app that adds messages to a queue. I'm following the examples about Azure Service Bus given here: http://www.windowsazure.com/en-us/develop/net/how-to-guides/service-bus-queues/ My program does nothing at the moment: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.ServiceBus; using Microsoft.ServiceBus.Messaging; namespace testConsole { class Program { static void Main(string[] args) { } } } The problem I'm

What is the maximum length of base64 encoded string that can be added to Azure queue?

泄露秘密 提交于 2019-12-06 03:43:53
I need to send compressed Base64 data over an Azure queue, which has a limitation of 64K. My code compresses the data and then encodes it as a Base64 string. I verify the compressed and encoded string does not exceed 64000 bytes (see encodedLen below), however, my code crashed when I tried to add a message of ~57,000 bytes . var byteString = Encoding.UTF8.GetBytes(articleDataToSend); var compressed = QuickLZ.compress(byteString, 1); var encoded = Convert.ToBase64String(compressed); var encodedLen = Encoding.UTF8.GetByteCount(encoded); if(encodedLen < 64000) { QueueMessage(_nlpInputQueue,

Azure Function used to write to queue - can I set metadata?

吃可爱长大的小学妹 提交于 2019-12-05 09:49:55
I can see from this page that you can access a queue message metadata properties simply enough when they are used as a trigger, but I want to do the opposite. I have an Azure function which writes messages to a queue, but it current has the default Expiration Time and I want to set a much shorter expiration time so they only live on the queue for a very short period. Is there a way when writing the message to the queue from the Azure Function to set the Expiration time? Thanks EDIT 1: One caveat is that I dont know the name of the queue ahead of time. That is part of the incoming message, so

How to Create Queue in Windows Azure?

杀马特。学长 韩版系。学妹 提交于 2019-12-05 07:39:24
问题 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

Should I put my events inside a queue after getting them from Azure Event Hub?

拜拜、爱过 提交于 2019-12-05 04:51:15
I'm currently developing an application hosted on Azure that uses Azure Event Hub. Basically I'm sending messages (or should I say, events) to the Event Hub from a Web API, and I have two listeners: a Stream Analytics task for real-time analysis a standard worker role that computes some stuff based on the received events and then stores them into an Azure SQL Database (this is a lambda architecture). I'm currently using the EventProcessorHost library to retrieve my events from the Event Hub inside my worker role. I'm trying to find some best practices about how to use the Event Hub (it is a