CLOUD
Note
If you are installing the connector locally for Confluent Platform, see Azure Event Hubs Source Connector for Confluent Platform.
The Kafka Connect Azure Event Hubs Source connector for Confluent Cloud is used to poll data from Azure Event Hubs and persist the data to an Apache Kafka® topic. For additional information about Azure Event Hubs, see the Azure Event Hubs documentation.
Important
If you are still on Confluent Cloud Enterprise, please contact your Confluent Account Executive for more information about using this connector.
The Azure Event Hubs source connector provides the following features:
azure.eventhubs.partition.starting.position
azure.eventhubs.consumer.group
azure.eventhubs.transport.type
azure.eventhubs.offset.type
max.events
You can manage your full-service connector using the Confluent Cloud API. For details, see the Confluent Cloud API documentation.
Use this quick start to get up and running with the Confluent Cloud Azure Event Hubs Source connector.
See the Quick Start for Apache Kafka using Confluent Cloud for installation instructions.
Click Connectors. If you already have connectors in your cluster, click Add connector.
Click the Azure Event Hubs Source connector icon.
Complete the following and click Continue.
AMQP
AMQP_WEB_SOCKETS
OFFSET
SEQ_NUM
50
499
Configuration properties that are not shown in the Confluent Cloud UI use the default values. For default values and property definitions, see Azure Event Hubs Source Connector Configuration Properties.
Verify the connection details and click Launch.
The status for the connector should go from Provisioning to Running. It may take a few minutes.
After the connector is running, verify that messages are populating your Kafka topic.
For additional information about this connector, see Azure Event Hubs Source Connector for Confluent Platform. Note that not all Confluent Platform connector features are provided in the Confluent Cloud connector.
See also
For an example that shows fully-managed Confluent Cloud connectors in action with Confluent Cloud ksqlDB, see the Cloud ETL Demo. This example also shows how to use Confluent Cloud CLI to manage your resources in Confluent Cloud.
Complete the following steps to set up and run the connector using the Confluent Cloud CLI.
Make sure you have all your prerequisites completed.
You must create topic names before before creating and launching this connector. Use the command below to create a topic using the Confluent Cloud CLI.
ccloud kafka topic create <topic-name>
Enter the following command to list available connectors:
ccloud connector-catalog list
Enter the following command to show the required connector properties:
ccloud connector-catalog describe <connector-catalog-name>
For example:
ccloud connector-catalog describe AzureEventHubsSource
Example output:
Following are the required configs: connector.class: AzureEventHubsSource name kafka.api.key kafka.api.secret azure.eventhubs.sas.keyname azure.eventhubs.sas.key azure.eventhubs.namespace azure.eventhubs.hub.name kafka.topic tasks.max
Create a JSON file that contains the connector configuration properties. The following example shows required and optional connector properties.
{ "connector.class": "AzureEventHubsSource", "name": "azure-eventhubs-source", "kafka.api.key": "<my-kafka-api-key>", "kafka.api.secret": "<my-kafka-api-secret>", "azure.eventhubs.sas.keyname": "<-my-shared-access-policy name->", "azure.eventhubs.sas.key": "<my-shared-access-key>", "azure.eventhubs.namespace": "<my-eventhubs-namespace>", "azure.eventhubs.hub.name": "<my-eventhub-name>", "azure.eventhubs.consumer.group": "<my-eventhub-consumer-group>", "kafka.topic": "<my-topic-name>", "azure.eventhubs.partition.starting.position": "START_OF_STREAM", "azure.eventhubs.transport.type": "AMQP", "azure.eventhubs.offset.type": "OFFSET", "max.events": "50", "tasks.max": "1" }
Note the following property definitions:
"name": Sets a name for your new connector.
"name"
"connector.class": Identifies the connector plugin name.
"connector.class"
"azure.eventhubs.partition.starting.position": (Optional) Sets the starting position in the Event Hub if no offsets are stored and a reset occurs. The value can be START_OF_STREAM or END_OF_STREAM. If no property is entered, the configuration defaults to START_OF_STREAM.
"azure.eventhubs.partition.starting.position"
START_OF_STREAM
END_OF_STREAM
"azure.eventhubs.transport.type": (Optional) Sets the transport type for communicating with Azure Event Hubs. The value can be AMQP or AMQP_WEB_SOCKETS. AMQP (over TCP) uses port 5671. AMQP over web sockets uses port 443. If no proerty is entered, the configuration defaults to AMQP.
"azure.eventhubs.transport.type"
"azure.eventhubs.offset.type": (Optional) Sets the offset type used to keep track of events. The value can be OFFSET (the Azure Event Hubs offset for the event) or SEQ_NUM (the sequence number of the event). If no property is entered, the configuration defaults to OFFSET.
"azure.eventhubs.offset.type"
"max.events": (Optional) The maximum number of events to read from an Event Hub partition when polling. If no property is entered, the configuration defaults to 50. 499 is the maximum number events.
"max.events"
Configuration properties that are not listed use the default values. For default values and property definitions, see Azure Event Hubs Source Connector Configuration Properties.
Enter the following command to load the configuration and start the connector:
ccloud connector create --config <file-name>.json
ccloud connector create --config az-event-hubs.json
Created connector azure-eventhubs-source lcc-ix4dl
Enter the following command to check the connector status:
ccloud connector list
ID | Name | Status | Type +-----------+--------------------------+---------+--------+ lcc-ix4dl | azure-eventhubs-source | RUNNING | source