Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I need to remove message from service bus queue after processing it in azure function?

New to Azure, I wrote an azure function that is triggered when message arrives to service bus queue. Do I need to remove this message manually or is this handled by service bus?

like image 512
epitka Avatar asked Jul 03 '18 14:07

epitka


People also ask

Why can't I receive messages from Azure service bus queue?

ReceiveDisabled: You can send messages to the queue, but you can't receive messages from it. You'll get an exception if you try to receive messages to the queue. Change the queue status in the Azure portal: In the Azure portal, navigate to your Service Bus namespace.

What is servicebusqueuetrigger in Azure web jobs service bus?

The "AzureWebJobsServiceBus" app setting. The ServiceBusQueueTrigger annotation allows you to create a function that runs when a Service Bus queue message is created. Configuration options available include queue name and connection string name.

How do I trigger a service bus queue in Java?

The following Java function uses the @ServiceBusQueueTrigger annotation from the Java functions runtime library to describe the configuration for a Service Bus queue trigger. The function grabs the message placed on the queue and adds it to the logs. Java functions can also be triggered when a message is added to a Service Bus topic.

How to peek/delete all scheduled messages from Azure service bus?

Once CancelScheduledMessageAsync method is called for the schedule message, schedule message will be deleted from the queue: Running the above sample code, you should be able to peek/delete all the scheduled messages from Azure service bus. Hope this helps!


1 Answers

No, you don't have to remove the message manually when you're using a Service Bus trigger:

The Functions runtime receives a message in PeekLock mode. It calls Complete on the message if the function finishes successfully, or calls Abandon if the function fails. If the function runs longer than the PeekLock timeout, the lock is automatically renewed as long as the function is running.

Source: Trigger - PeekLock behavior

like image 62
rickvdbosch Avatar answered Sep 16 '22 11:09

rickvdbosch