แก้ไข

แชร์ผ่าน


Apache Kafka developer guide for Azure Event Hubs

This article provides links to articles that describe how to integrate your Apache Kafka applications with Azure Event Hubs.

Overview

Event Hubs provides a Kafka endpoint that can be used by your existing Kafka based applications as an alternative to running your own Kafka cluster. Event Hubs works with many of your existing Kafka applications. For more information, see Event Hubs for Apache Kafka

Quickstarts

You can find quickstarts in GitHub and in this content set that helps you quickly ramp up on Event Hubs for Kafka.

Quickstarts in GitHub

See the following quickstarts in the azure-event-hubs-for-kafka repo:

Client language/framework Description
.NET

This quickstart will show how to create and connect to an Event Hubs Kafka endpoint using an example producer and consumer written in C# using .NET Core 2.0.

This sample is based on Confluent's Apache Kafka .NET client, modified for use with Event Hubs for Kafka.

Java This quickstart will show how to create and connect to an Event Hubs Kafka endpoint using an example producer and consumer written in Java.
Node.js

This quickstart will show how to create and connect to an Event Hubs Kafka endpoint using an example producer and consumer written in Node.

This sample uses the node-rdkafka library.

Python

This quickstart will show how to create and connect to an Event Hubs Kafka endpoint using an example producer and consumer written in python.

This sample is based on Confluent's Apache Kafka Python client, modified for use with Event Hubs for Kafka.

Go

This quickstart will show how to create and connect to an Event Hubs Kafka endpoint using an example producer and consumer written in Go.

This sample is based on Confluent's Apache Kafka Golang client, modified for use with Event Hubs for Kafka.

Sarama kafka Go This quickstart will show how to create and connect to an Event Hubs Kafka endpoint using an example producer and consumer written in Go using the Sarama Kafka client library.
Kafka This quickstart will show how to create and connect to an Event Hubs Kafka endpoint using the CLI that comes bundled with the Apache Kafka distribution.
kcat kcat is a non-JVM command-line consumer and producer based on librdkafka, popular due to its speed and small footprint. This quickstart contains a sample configuration and several simple sample kafkacat commands.

Quickstarts in DOCS

See the quickstart: Data streaming with Event Hubs using the Kafka protocol in this content set, which provides step-by-step instructions on how to stream into Event Hubs. You learn how to use your producers and consumers to talk to Event Hubs with just a configuration change in your applications.

Tutorials

Tutorials in GitHub

See the following tutorials on GitHub:

Tutorial Description
Akka This tutorial shows how to connect Akka Streams to Kafka-enabled Event Hubs without changing your protocol clients or running your own clusters. There are two separate tutorials using Java and Scala programming languages.
Connect This document will walk you through integrating Kafka Connect with Azure Event Hubs and deploying basic FileStreamSource and FileStreamSink connectors. While these connectors are not meant for production use, they demonstrate an end-to-end Kafka Connect Scenario where Azure Event Hubs masquerades as a Kafka broker.
Filebeat This document will walk you through integrating Filebeat and Event Hubs via Filebeat's Kafka output.
Flink This tutorial will show how to connect Apache Flink to Kafka-enabled Event Hubs without changing your protocol clients or running your own clusters.
FluentD This document will walk you through integrating Fluentd and Event Hubs using the out_kafka output plugin for Fluentd.
Interop This tutorial shows you how to exchange events between consumers and producers using different protocols.
Logstash This tutorial will walk you through integrating Logstash with Kafka-enabled Event Hubs using Logstash Kafka input/output plugins.
MirrorMaker This tutorial shows how an event hub and Kafka MirrorMaker can integrate an existing Kafka pipeline into Azure by mirroring the Kafka input stream in the Event Hubs service.
NiFi This tutorial will show how to connect Apache NiFi to an Event Hubs namespace.
OAuth Quickstarts show you how to create and connect to an Event Hubs Kafka endpoint using an example producer and consumer written in Go and Java programming languages.
Confluent's Schema Registry This tutorial will walk you through integrating Schema Registry and Event Hubs for Kafka.
Spark This tutorial will show how to connect your Spark application to an event hub without changing your protocol clients or running your own Kafka clusters.

Tutorials in DOCS

Also, see the tutorial: Process Apache Kafka for Event Hubs events using Stream analytics in this content set, which shows how to stream data into Event Hubs and process it with Azure Stream Analytics.

How-to guides

See the following How-to guides in our documentation:

Article Description
Mirror a Kafka broker in an event hub Shows how to mirror a Kafka broker in an event hub using Kafka MirrorMaker.
Connect Apache Spark to an event hub Walks you through connecting your Spark application to Event Hubs for real-time streaming.
Connect Apache Flink to an event hub Shows you how to connect Apache Flink to an event hub without changing your protocol clients or running your own clusters.
Integrate Apache Kafka Connect with a event hub (Preview) Walks you through integrating Kafka Connect with an event hub and deploying basic FileStreamSource and FileStreamSink connectors.
Connect Akka Streams to an event hub Shows you how to connect Akka Streams to an event hub without changing your protocol clients or running your own clusters.
Use the Spring Boot Starter for Apache Kafka with Azure Event Hubs Demonstrates how to configure a Java-based Spring Cloud Stream Binder created with the Spring Boot Initializer to use Apache Kafka with Azure Event Hubs.

Next steps

Review samples in the GitHub repo azure-event-hubs-for-kafka under quickstart and tutorials folders.

Also, see the following articles: