Event Hubs
Synopsis
Creates a target that sends processed messages to Azure Event Hubs with support for multiple authentication methods, batch processing, and automatic retry mechanisms. Provides high-throughput event streaming to Azure Event Hubs for real-time analytics and downstream processing.
Schema
- name: <string>
description: <string>
type: eventhubs
pipelines: <pipeline[]>
status: <boolean>
properties:
client_connection_string: <string>
tenant_id: <string>
client_id: <string>
client_secret: <string>
namespace: <string>
event_hub: <string>
partition_key: <string>
format: <string>
batch_size: <numeric>
max_retry: <numeric>
retry_interval: <numeric>
timeout: <numeric>
compression: <string>
tls:
status: <boolean>
cert_name: <string>
key_name: <string>
Configuration
The following fields are used to define the target:
Field | Required | Default | Description |
---|---|---|---|
name | Y | Target name | |
description | N | - | Optional description |
type | Y | Must be eventhubs | |
pipelines | N | - | Optional post-processor pipelines |
status | N | true | Enable/disable the target |
Connection
EventHubs target supports two authentication methods:
Method 1: Connection String Authentication
Field | Required | Default | Description |
---|---|---|---|
client_connection_string | Y* | Event Hubs connection string (required if not using method 2) | |
event_hub | Y | Event hub name to send messages to |
Method 2: Service Principal Authentication
Field | Required | Default | Description |
---|---|---|---|
tenant_id | Y* | Azure tenant ID (required if not using connection string) | |
client_id | Y* | Azure service principal client ID | |
client_secret | Y* | Azure service principal client secret | |
namespace | Y* | Event Hubs namespace (required if not using connection string) | |
event_hub | Y | Event hub name to send messages to |
* = Conditionally required (see authentication methods above)
Message Configuration
Field | Required | Default | Description |
---|---|---|---|
partition_key | N | - | Partition key for message routing |
format | N | json | Output format (json , multijson , raw ) |
compression | N | - | Compression method (gzip , lz4 ) |
Performance
Field | Required | Default | Description |
---|---|---|---|
batch_size | N | 100 | Number of messages per batch |
timeout | N | 30 | Connection timeout in seconds |
max_retry | N | 3 | Maximum retry attempts |
retry_interval | N | 5 | Retry interval in seconds |
TLS
Field | Required | Default | Description |
---|---|---|---|
tls.status | N | false | Enable TLS encryption |
tls.cert_name | N* | TLS certificate file path (required if TLS enabled) | |
tls.key_name | N* | TLS private key file path (required if TLS enabled) |
* = Conditionally required (only when tls.status: true
)
TLS certificate and key files must be placed in the service root directory.
Details
The EventHubs target sends processed messages to Azure Event Hubs for real-time event streaming and analytics. It supports automatic batching for optimal performance, configurable retry mechanisms for reliability, and multiple authentication methods for flexible deployment scenarios.
Messages are sent with automatic partition distribution unless a specific partition key is provided. The target handles connection pooling and automatic reconnection on network failures.
Format options include JSON for structured data, multijson for line-delimited JSON arrays, and raw format for preserving original message structure. Compression options help reduce network bandwidth for high-volume scenarios.
Examples
The following are commonly used configuration types.
Basic with Connection String
Creating a basic EventHubs target with connection string... |
|
Target sends JSON messages to Event Hubs in batches... |
|
Service Principal Authentication
Using service principal authentication for secure access... |
|
High-Throughput Configuration
Optimizing for high-volume message sending... |
|
Partitioned Messages
Using partition keys for message routing control... |
|
Secure Connection with TLS
Implementing TLS encryption for secure transmission... |
|
Pipeline Processing
Applying post-processing pipelines before sending... |
|