azureservicebus

I have a long running process which I call in my Service Bus Queue. I want it to continue beyond 5 minutes

a 夏天 提交于 2019-12-06 07:56:28
I have a long running process which performs matches between millions of records I call this code using a Service Bus, However when my process passes the 5 minute limit Azure starts processing the already processed records from the start again. How can I avoid this Here is my code: private static async Task ProcessMessagesAsync(Message message, CancellationToken token) { long receivedMessageTrasactionId = 0; try { IQueueClient queueClient = new QueueClient(serviceBusConnectionString, serviceBusQueueName, ReceiveMode.PeekLock); // Process the message receivedMessageTrasactionId = Convert

“Wake up” time of Azure Function triggered by Service Bus Queue

心不动则不痛 提交于 2019-12-06 06:58:41
I have an Azure Function triggered by Azure Service Bus queue - Azure Function App is hosted in consumption plan. How long does it take at most to wake up an Azure Function when new message in queue appears? (assuming there were no message during past 20 minutes). Is it specified anywhere? I've found in the Documentation that: For non-HTTP triggers, new instances will only be allocated at most once every 30 seconds. Does it mean that I won't be able to process the first message in the queue faster than within 30 seconds? Will adding Timer Triggered Azure Function to the same Function App

Service Bus message abandoned despite WebJobs SDK handler completed successfully

江枫思渺然 提交于 2019-12-06 06:54:46
问题 I have implemented a long running process as a WebJob using the WebJobs SDK. The long running process is awaited because I want the result. public async Task ProcessMessage([ServiceBusTrigger("queuename")] MyMessage message) { await Run(message.SomeProperty); // takes several minutes // I want to do something with the result here later.. } What I can't figure out is why the message sometimes is abandoned which of course triggers the handler again. I've tried to debug (locally), setting

Sending 1000 brokered messages to the service bus using the SendBatchAsync method

徘徊边缘 提交于 2019-12-06 06:24:29
I have an application wherein data is fetched from the SQL DB and sent to the service bus as brokered message. These are the steps: Data fetched from the DB(in batches of 1000) Each row of data converted into Brokered Message and added into a list. The list of 1000 brokered messages is sent to the service bus using SendBatchAsync method. It is at the 3rd step that I am facing the issue. This is the code for that: public async Task SendMessagesAsync(List<BrokeredMessage> brokeredMessageList) { try { var topicClient = CreateTopicClient(); await topicClient.SendBatchAsync(brokeredMessageList); }

How can I Send/Receive a message from Azure Service Bus from Qpid JMS (qpid-jms-client-0.11.1.jar)?

偶尔善良 提交于 2019-12-06 05:20:56
I am currently researching how to connect to Azure Service Bus using Qpid JMS (qpid-jms-client-0.11.1.jar). I have created a Demo Java application SimpleSenderReceiver which connects to an already configured Azure Service Bus using the following guide ( #link1 ). This code seems to work using a "very" old version om the Qpid JMS client (version 0.32). I am now trying to get it to work with the latest stable version of Qpid JMS (qpid-jms-client-0.11.1.jar), And so far I have not been successful. Going through the documentation #link2 of Qpid JMS 0.11.1, you can see that the way that the in the

Azure service bus read performance

≯℡__Kan透↙ 提交于 2019-12-06 03:58:54
问题 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 =

Azure Service Bus keeps throwing MessageLockLostExceptions

丶灬走出姿态 提交于 2019-12-06 03:30:12
I keep getting MessageLockLostExceptions when processing messages. I am using Microsoft.Azure.ServiceBus 3.2.0 with .NET Core 2.1. I have a queue with LockDuration set to 30 seconds already containing a number of messages to be processed. I took the very basic message-receiving tutorial code from https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-dotnet-get-started-with-queues#receive-messages-from-the-queue , which works fine. Now I want to simulate a slightly longer running message processing task (but still well within LockDuration ) by adding Task.Delay(10_000) . But

The operation did not complete within the allotted timeout of 00:01:00

谁都会走 提交于 2019-12-06 01:54:14
问题 I am using code snippet to send message into the service bus topic. try { // sb is instance of ServiceBusConfig.GetServiceBusForChannel await sb.SendAsync(message); } catch (Exception ex) { this.logger.LogError( "chanel", "An error occurred while sending a notification: " + ex.Message, ex); throw; } and implementation is public async Task SendAsync(BrokeredMessage message) { if (this.topicClient == null) { this.topicClient = TopicClient.CreateFromConnectionString(this.primaryConnectionString,

Session based service bus with Azure Function

萝らか妹 提交于 2019-12-06 00:05:46
I am using session queue on Azure and when I push some data on queue,I write one Azure function to trigger. Please note that I have created statefull/session based queue. The problem is when I push data to queue at that moment I got error like The listener for function 'xxx' was unable to start. Microsoft.ServiceBus: It is not possible for an entity that requires sessions to create a non-sessionful message receiver So my question is am I not able to use function with queue/topic with session? This is a common ask, but currently Web Jobs SDK, and thus Azure Functions, don't support Service Bus

Do Azure Service Bus Notification Hubs work with websockets and javascript?

妖精的绣舞 提交于 2019-12-05 23:57:01
问题 I am interested in using Azure Service Bus Notification Hubs. However, my first "client" will be a websocket based connection to a ASP.NET MVC site with Knockout. Currently, I'm trying out SignalR to push notification to the clients. However, it looks like this would be much easier if I could use SB Notification Hubs. All of the examples are Windows or iOS. Can you use Azure Service Bus Notification Hubs with WebSocket based HTML clients? 回答1: I am a Program Manager in the Service Bus team.