Produce
yaml
type: "io.kestra.plugin.azure.eventhubs.produce"
Examples
yaml
id: azure_eventhubs_send_events
namespace: company.team
inputs:
- id: file
type: FILE
description: a CSV file with columns id, username, tweet, and timestamp
tasks:
- id: read_csv_file
type: io.kestra.plugin.serdes.csv.CsvToIon
from: "{{ inputs.file }}"
- id: transform_row_to_json
type: io.kestra.plugin.scripts.nashorn.FileTransform
from: "{{ outputs.read_csv_file.uri }}"
script: |
var result = {
"body": {
"username": row.username,
"tweet": row.tweet
}
};
row = result
- id: send_to_eventhub
type: io.kestra.plugin.azure.eventhubs.Produce
from: "{{ outputs.transform_row_to_json.uri }}"
eventHubName: my_eventhub
namespace: my_event_hub_namespace
connectionString: "{{ secret('EVENTHUBS_CONNECTION') }}"
maxBatchSizeInBytes: 4096
maxEventsPerBatch: 100
bodySerializer: "JSON"
bodyContentType: application/json
eventProperties:
source: kestra
Properties
eventHubName *Requiredstring
from *Requiredstringarrayobject
namespace *Requiredstring
bodyContentType string
bodySerializer string
Default
STRING
Possible Values
STRING
BINARY
ION
JSON
bodySerializerProperties object
Default
{}
clientMaxRetries integerstring
Default
5
clientRetryDelay integerstring
Default
500
connectionString string
customEndpointAddress string
eventProperties object
SubType string
Default
{}
maxBatchSizeInBytes integerstring
maxEventsPerBatch integerstring
Default
1000