DEV Community

Ewerton Jordão
Ewerton Jordão

Posted on

1

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.

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

AWS Security LIVE!

Hosted by security experts, AWS Security LIVE! showcases AWS Partners tackling real-world security challenges. Join live and get your security questions answered.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️