DEV Community

Ewerton Jordão
Ewerton Jordão

Posted on

Utilizando Azure Functions (PowerShell Core) KafkaTrigger

E ae, pessoal, beleza? Falei recentemente na live do dia 25/05 de como utilizar a trigger Kafka do Azure Functions com o PowerShell Core(na data deste artigo a nova Trigger está em preview),é uma implementação bem simples em questão de código dentro da function, toda a implementação core para consumir a mensagem é implementada por debaixo dos panos. Utilizando o PowerShell recebemos um objeto KafkaEvent e você pode trabalhar com os dados da mensagem. Anúncio do Preview Kafka trigger blog post

Requisitos

Azure functions core tools.
Conta no Azure.
Conta no Confluente Cloud.

Neste fork inclui a implementação com os exemplos para PowerShell.

GitHub logo EwertonJordao / azure-functions-kafka-extension

Kafka extension for Azure Functions

Azure Functions extensions for Apache Kafka

Branch Status
master Build Status
dev Build Status

This repository contains Kafka binding extensions for the Azure WebJobs SDK. The extension status is in beta. The communication with Kafka is based on library Confluent.Kafka.

Please find samples here

DISCLAIMER: This library is supported in the Premium Plan along with support for scaling. It is fully supported when using Azure Functions on Kubernetes where scaling will be handed by KEDA - scaling based on Kafka queue length. It is currently not supported on the Consumption plan (there will be no scale from zero).

Bindings

There are two binding types in this repo: trigger and output. To get started using the extension in a WebJob project add reference to Microsoft.Azure.WebJobs.Extensions.Kafka project and call AddKafka() on the startup:

static async Task Main(string[] args)
{
  var builder = new HostBuilder()
        .UseEnvironment
Enter fullscreen mode Exit fullscreen mode

Live dia 25/05.

Latest comments (0)