Azure Event Hubs
The Azure Event Hubs destination writes data to a single event hub in Microsoft Azure Event Hubs.
Each record is written to the event hub as an event. Events are written to available partitions using a round-robin distribution pattern.
When you configure the destination, you specify the event hub to use and connection information for the event hub. You also specify the data format to use.
Before you use the Azure Event Hubs destination, complete the prerequisite tasks.
Prerequisites
Complete the following prerequisites, as needed, before you configure the Azure Event Hubs destination.
- Authorize access
to the event hub using shared access signatures.
The Azure Event Hubs destination requires read and write access to the event hub. For information about assigning access to Azure Event Hubs resources, see the Azure documentation.
The destination does not support access through Active Directory at this time.
- Retrieve the Azure
Event Hubs connection string.When you configure the Azure Event Hubs destination, you must provide the namespace, shared access policy, and shared access key. These details are included on the Azure Event Hubs connection string, as follows:
Endpoint=sb://<namespace>.servicebus.windows.net/;SharedAccessKeyName=<shared access policy>;SharedAccessKey=<shared access key>
For information about retrieving the connection string, see the Azure documentation.
Data Formats
The Azure Event Hubs destination writes records based on the specified data format.
- Avro
- The destination writes records based on the Avro schema. You can use one of the following methods to specify the location of the Avro schema definition:
- In Pipeline Configuration - Use the schema defined in the stage properties. Optionally, you can configure the destination to register the specified schema with Confluent Schema Registry at a URL with a schema subject.
- Confluent Schema Registry - Retrieve the schema from Confluent Schema Registry. Confluent Schema Registry is a distributed storage layer for Avro schemas. You specify the URL to Confluent Schema Registry and whether to look up the schema by the schema ID or subject.
You can also compress data with an Avro-supported compression codec.
- Delimited
- The destination writes a delimited message for every record. You can specify a custom delimiter, quote, and escape character to use in the data.
- JSON
- The destination writes a JSON line message for every record. For more information, see the JSON Lines website.
- Text
- The destination writes a message with a single String field for every record. When you configure the destination, you select the field to use.