Kafka
被集成系统作为Kafka Producer,将数据发送到Kafka,由平台提供Consumer程序将相应数据实时读取,并通过规则处理后,保存入平台。
# kafka
[TestKafkaInput]
type = "KafkaInput"
addrs = ["localhost:9092"]
topic = "test"
#Default: <hostname>
#id = "wecise"
#The total number of times to retry a metadata request when the cluster is in the middle of a leader election (default3).
#metadata_retries = 3
#Group id. Default: <hostname>
#group = "wecise"
#The default number of message bytes to fetch from the broker in each request (default 1MB)
#default_fetch_size = 1048576
#The minimum number of message bytes to fetch in a request - the broker will wait until at least this many are available.The default is 1
#min_fetch_size = 1
#The maximum amount of time the broker will wait for Consumer.Fetch.Min bytes to become available before it returns fewer than that anyways. The default is 250ms.
#max_wait_time = 250
#offset_method
#Default: 2.1.1
#version = "2.1.1"
[TestKafkaOutput]
type = "NatsOutput"
is_streaming = true
subject = "matrix.rules.test.kafka"
reconnect = true
message_matcher = "Logger == 'TestKafkaInput'"
encoder = "PayloadEncoder"
use_protocol = true
[TestKafkaOutput.attr]
[!NOTE] 配置文件支持存放在ETCD上,也支持存放在操作系统的文件系统里