azureservicebus

How to have a configuration based queue name for web job processing?

爱⌒轻易说出口 提交于 2019-12-04 10:14:34
I have a webjob app to process a ServiceBus queue, which runs fine, with the following method: public static void ProcessQueueMessage([ServiceBusTrigger("myQueueName")] BrokeredMessage message, TextWriter log) However, I would like to be able to change the queue name without recompiling, according for example to a configuration appsetting, can it be done? I've found an implementation of the INameResolver using configuration setting from the azure-webjobs-sdk-samples . /// <summary> /// Resolves %name% variables in attribute values from the config file. /// </summary> public class

Does Azure ServiceBus QueueClient.OnMessage execute on a different thread

冷暖自知 提交于 2019-12-04 08:16:58
问题 Does the QueueClient.OnMessage method always execute the callback parameter on a different thread? I assume that if MaxConcurrentCalls is set to 10 then the queueClient would spin up a maximum of 10 threads to process the messages in parallel. Does a new thread get created if you pass in a MaxConcurrentConnection value of 1 or does it execute back on the current thread? My actual problem: Within a Worker Role I would like to handle multiple queues but have them all process concurrently. E.g.

Azure service bus read performance

雨燕双飞 提交于 2019-12-04 07:35:51
I am trying to improve throughput on a windows service using Azure Service Bus. What I have noticed is that if I have code like like this. client.OnMessageAsync(async message => { var timer = new Stopwatch(); timer.Start(); bool shouldAbandon = false; try { // asynchronouse processing of messages await messageProcessor.ProcessAsync(message); Interlocked.Increment(ref SimpleCounter); // complete if successful processing await message.CompleteAsync(); } catch (Exception ex) { shouldAbandon = true; Console.WriteLine(ex); } if (shouldAbandon) { await message.AbandonAsync(); } timer.Stop();

Route events to eventhub EventProcessor

萝らか妹 提交于 2019-12-04 06:59:23
I have events of different types. For example, some data is telemetry data, some is error information etc. I thought it would be a good idea to create several IEventProcessor implementations, one for each event type. So each implementation will handle the event differently. Like writing to file or to database. What's the best way to route events to a specific EventProcessor? Should I let an EventProcessor monitor a specific partitionkey and if so, how? Should I use the constructor of the EventProcessorHost that lets me specify a consumergroupname? If so, how can I send to a specific

Azure: Could not load file or assembly 'Microsoft.ServiceBus

心不动则不痛 提交于 2019-12-04 03:32:48
问题 I have a app fabric service that I want to test. (http://xxx.cloudapp.net:8081/service.svc). I created a console app and added a service reference to the service and got the following error: Could not load file or assembly 'Microsoft.ServiceBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. I added a reference to Microsoft.ServiceBus from C:\Program Files (x86)\Windows Azure platform AppFabric SDK\V1.0

Why use a QueueClient vs MessageFactory?

我们两清 提交于 2019-12-04 01:11:23
In Azure Service Bus, you can send a brokered message using QueueClient and MessageFactory . I would like to know why would you want to use one over the other. Azure Service Bus provides different way to send/receive messages. You can use the QueueClient to send and receive message to/from a queue. You can use the TopicClient to send message to a topic And you can use the SubscriptionClient to receive message from a subscription. Using MessageSender and MessageReceiver , you create sender and receiver that are entity type invariant: var factory = MessagingFactory.CreateFromConnectionString(

Send message directly to Subscription

删除回忆录丶 提交于 2019-12-03 17:41:13
问题 Is it possible to send a message directly to a Subscription queue? Scenario: A message failed, dropped onto the deadletter, the message has been picked up manually using defer, cloned and needs to be sent to the queue it was first deadlettered on, but NOT the topic. Can I send a message directly to a subscriber? I've considered creating a separate retry queue per subscriber, where the handling service will also receive messages from but i'd rather not do this. 回答1: this is a similar question

Azure ServiceBus from Xamarin Forms PCL

牧云@^-^@ 提交于 2019-12-03 17:03:43
How is brokered messaging via Azure Service Bus done from a Xamarin Forms PCL...is there an SDK, library or plugin? If there is a way to hand roll a brokered message, I suppose it could be accomplished with an HttpClient & the REST API ... I finally have a working method for posting a message to an Azure Service Bus Queue from a Xamarin PCL! The way to do this is via an HttpClient. Gotchas that made the solution elusive: The nuget package for Microsoft.ServiceBus.Messaging will happily install, but has no exposure to the portable class. WebClient examples abound, but there is no webclient

Azure ServiceBus Message Serialization/Deserialization

北战南征 提交于 2019-12-03 11:54:26
I am using application(.Net Core) to send an object through azure service bus and received by a web job(.Net Core) Question is how to serialize/deserialize to send/receive the object? I found lots of reference for the legacy BroakerMessage.GetBody() to receive message, but not the new .Net Core method, please advice, thanks. Sender code: using Microsoft.Azure.ServiceBus; MyClass object = new MyClass(); var message = new Message(object); await queueClient.SendAsync(message); Receiver code: using Microsoft.Azure.ServiceBus; public void ProcessQueueMessage([ServiceBusTrigger("queue")] Message

Guidance OnMessageOptions.AutoRenewTimeout

自古美人都是妖i 提交于 2019-12-03 11:51:50
Can someone offer some more guidance on the use of the Azure Service Bus OnMessageOptions.AutoRenewTimeout http://msdn.microsoft.com/en-us/library/microsoft.servicebus.messaging.onmessageoptions.autorenewtimeout.aspx as I haven't found much documentation on this option, and would like to know if this is the correct way to renew a message lock My use case: 1) Message Processing Queue has a Lock Duration of 5 minutes (The maximum allowed) 2) Message Processor using the OnMessageAsync message pump to read from the queue (with a ReceiveMode.PeekLock) The long running processing may take up to 10