kafkaProducer
x/kafkaProducer
component: publish kafka data. Used to send the current message payload to the specified kafka topic.
# Configuration
Field | Type | Required | Description | Default value |
---|---|---|---|---|
topic | string | Yes | Publish topic, can using Component Configuration Variables. | - |
key | string | No | Partition key, can using Component Configuration Variables. | - |
partition | int | No | Partition number | - |
brokers | []string | Yes | Kafka server address list | ["localhost:9092"] |
# Relation Type
- Success: Execution successful, send message to
Success
chain - Failure: Execution failed, send message to
Failure
chain
# Execution result
- Execution successful:
- msg.data: unchanged.
- msg.Metadata.partition: partition number.
- msg.Metadata.offset: offset.
# Configuration example
{
"id": "s5",
"type": "x/kafkaProducer",
"name": "Publish to kafka",
"debugMode": true,
"configuration": {
"topic": "device.msg.request",
"brokers": ["localhost:9092"]
}
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# Application example
Application example reference: kafka_producer_test (opens new window)
Edit this page on GitHub (opens new window)
Last Updated: 2024/10/23, 10:13:01