All Projects → ealsur → WebJobs.Extensions.GroupQueueTrigger

ealsur / WebJobs.Extensions.GroupQueueTrigger

Licence: MIT license
Extension for Azure Webjobs SDK that returns groups of messages of an Azure Queue

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to WebJobs.Extensions.GroupQueueTrigger

Azure Functions Host
The host/runtime that powers Azure Functions
Stars: ✭ 1,650 (+8150%)
Mutual labels:  azure-webjobs-sdk
HttpClientFactory.Azure.Functions
[Archived] Azure Functions and Azure WebJobs binding extensions for HttpClientFactory. This is no longer the best approach: https://www.tpeczek.com/2019/10/alternative-approach-to-httpclient-in.html
Stars: ✭ 14 (-30%)
Mutual labels:  azure-webjobs-sdk

Azure Webjobs SDK Extension for Azure Queue

Introduction

This extension will enable you to trigger functions and receive the group of messages instead of a single message like with [QueueTrigger]

Once referenced you can enable it on the JobHostConfiguration object.

var config = new JobHostConfiguration
{
    StorageConnectionString = "...",
    DashboardConnectionString = "..."
};
config.UseGroupQueueTriggers();
var host = new JobHost(config);
host.RunAndBlock();

It supports POCO objects and returns always a List.

And decorate each function like this:

public static void MyFunction([GroupQueueTrigger("my_queue")]List<MyClass> messages)

This way you will only get one trigger of the function and receive all the obtained messages, instead of one trigger per message with the [QueueTrigger].

There are optional parameters too: the size of the requested block:

public static void MyFunction([GroupQueueTrigger("my_queue", 10)]List<MyClass> messages)

And the Minimun and Maximun Polling intervals (in minutes):

public static void MyFunction([GroupQueueTrigger("my_queue", 10, 1, 10)]List<MyClass> messages)

Installation

You can obtain it through Nuget with:

Install-Package Microsoft.Azure.WebJobs.Extensions.GroupQueueTrigger

Or clone this repo and reference it.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].