Azure Event Hubs
This page describes the usage of the Stream Reactor Azure Event Hubs Source Connector.
A Kafka Connect source connector to read events from Azure Event Hubs and push them to Kafka.
In order to leverage Kafka API in your Event Hubs it has to be at least on Standard Pricing Tier. More info here.
Connector Class
Example
For more examples see the tutorials.
Below example presents all the necessary parameters configuration in order to use Event Hubs connector. It contains all the necessary parameters (but nothing optional, so feel free to tweak it to your needs):
KCQL support
Connector allows for multiple KCQL commands.
The following KCQL is supported:
The selection of fields from the Event Hubs message is not supported.
Payload support
As for now Azure Event Hubs Connector supports raw bytes passthrough from source Hub to Kafka Topic specified in the KCQL config.
Authentication
You can connect to Azure EventHubs passing specific JAAS parameters in configuration.
Learn more about different methods of connecting to Event Hubs on Azure website. The only caveat is to add connector-specific prefix like in example above. See Fine-tunning the Kafka Connector for more info.
Fine-tunning the Kafka Connector
The Azure Event Hubs Connector utilizes the Apache Kafka API implemented by Event Hubs. This also allows fine-tuning for user-specific needs because the Connector passes all of the properties with a specific prefix directly to the consumer. The prefix is connect.eventhubs.connection.settings
and when user specifies a property with it, it will be automatically passed to the Consumer.
User wants to fine-tune how much data records comes through the network at once. He specifies below property as part of his configuration for Azure Event Hubs Connector before starting it.
It means that internal Kafka Consumer will poll at most 100 records at time (as max.poll.records
is passed directly to it)
There are certain exceptions to this rule as couple of those are internally used in order to smoothly proceed with consumption. Those exceptions are listed below:
client.id
- Connector sets it by itselfgroup.id
- Connector sets it by itselfkey.deserializer
- Connector transitions bytes 1-to-1value.deserializer
- Connector transitions bytes 1-to-1enable.auto.commit
- connector automatically sets it tofalse
and checks what offsets are committed in output topic instead
Option Reference
Name | Description | Type | Default Value |
---|---|---|---|
connect.eventhubs.source.connection.settings.bootstrap.servers | Specifies the Event Hubs server location. | string | |
connect.eventhubs.source.close.timeout | Amount of time (in seconds) for Consumer to close. | int | 30 |
connect.eventhubs.source.default.offset | Specifies whether by default we should consume from earliest (default) or latest offset. | string | earliest |
connect.eventhubs.kcql | Comma-separated output KCQL queries | string |
Last updated