Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 2.39 KB

File metadata and controls

68 lines (46 loc) · 2.39 KB

Developers guide for Kafka Functions for PowerShell

Explain how to configure and run the sample

Prerequisite

Powershell works not only windows but OSX and Linux and .NET Core 2.2+ However, this tutorial focus on Windows with Powershell usage.

Installation

Install Kafka extensions

PS1 > func extensions install

Configuration

Copy the local.settings.json.example to local.settings.json. Change confguration for your Kafka Cluster.

| Name | Description | NOTE | | BrokerList | Kafka Broker List | e.g. changeme.eastus.azure.confluent.cloud:9092 | | ConfluentCloudUsername | Username of Confluent Cloud | - | | ConfluentCloudPassword | Password of Confluent Cloud | - |

For more configuration, you can refer to the samples README.md

Run Functions

Startup Kafka cluster

This sample is written for Confluent cloud. The Confluent Cloud is a managed service of Kafka clusters. If you want to run it on your PC, You can run a Kafka cluster using docker-compose. For more details, please refer to the following link.

Start Azure Functions

PS1 > func start

Send Events

Send Kafka events from a producer, and you can use ccloud command for the confluent cloud.

$ ccloud login
$ ccloud kafka topic produce message

For more details, Go to ccloud.

If you want to send an event to the local Kafka cluster, you can use kafakacat instead.

$ apt-get update && apt-get install kafkacat
$ kafkacat -b broker:29092 -t users -P

Resource