PutKafka
描述:
通过Apache Kafka 0.8.X版本的生成API来将输入数据流内容作为消息发送。要发送的消息可以是单独的数据流,也可以是分隔符分隔的(使用自定义分隔符,比如”换行“) 。与发送消息的Kafka组件 GetKafka 相对应。
标签:
Apache, Kafka, Put, Send, Message, PubSub, 0.8.x, 发送, 消息
参数:
如下列表中,必填参数则标识为加粗. 其他未加粗参数,则表示为可选参数。表中同时提到参数默认值设置, 并且 参数还支持 表达式语言.
名字 | 默认值 | 允许值列表 | 描述 |
---|---|---|---|
Kafka Brokers | 由英文逗号分隔的Kafka Brokers列表,其基本格式为 <host>:<port> 支持表达式语言 (仅支持变量) | ||
主题名 | 生成消息的主题名 支持表达式语言 (支持流属性和变量) | ||
分区名 | 指定消息添加的分区名。如果使用消息分隔符,在同一数据流的消息将被发送到同一分区。如果设置了分区,但是不可用,则将按失败输出 支持表达式语言 (支持流属性和变量) | ||
Kafka键 | 用于消息的键 支持表达式语言 (支持流属性和变量) | ||
消息保证策略 | 高性能 | - 高性能 - 单节点保证 - 重复保证 | 指定发送到Kafka的消息保证策略 |
Message Delimiter | Specifies the delimiter (interpreted in its UTF-8 byte representation) to use for splitting apart multiple messages within a single FlowFile. If not specified, the entire content of the FlowFile will be used as a single message. If specified, the contents of the FlowFile will be split on this delimiter and each section sent as a separate Kafka message. Note that if messages are delimited and some messages for a given FlowFile are transferred successfully while others are not, the messages will be split into individual FlowFiles, such that those messages that were successfully sent are routed to the 'success' relationship while other messages are sent to the 'failure' relationship. 支持表达式语言 (支持流属性和变量) | ||
缓存大小 | 5 MB | 用于发送的最大缓存数据大小 | |
记录大小 | 1 MB | 处理的单个记录大小 | |
通信超时 | 30 secs | 指定在通信错误之前的Kafka响应的等待时间 | |
分批数量 | 16384 | 指定批次处理消息的数量,生产者将一批记录一起发送到相同的分区来减少请求次数,这有助于提升客户端和服务的性能 | |
队列缓存时间 | 发送消息之前缓存数据的最大时效,比如说设置100 ms,将会把100毫秒内的消息一起发送。这将提高吞吐量,但会由于缓冲而增加消息传递延迟。 | ||
压缩编码 | 不使用 | - 不使用 - GZIP - Snappy | 用于指定所有生产者生成的数据的压缩编码 |
客户端名 | 当与Kafka通信而使用的客户端名 |
动态参数:
名字 | 值 | 描述 |
---|---|---|
The name of a Kafka configuration property. | The value of a given Kafka configuration property. | 在加载提供的配置之后,这些属性将被添加到Kafka的配置中,如果动态属性是已设置的属性,则其值将被忽略并记录警告消息。有关可用Kafka属性的列表,请参阅: http://kafka.apache.org/documentation.html#configuration. 不支持表达式语言 |
连线:
名字 | 描述 |
---|---|
success | 所有成功发送到Kafka的内容将输出到此成功连线 |
failure | 任何不能发送到Kafka的数据流将输出到此失败连线 |
读取属性:
未提供。
写入属性:
未提供。
状态管理:
该组件不保存状态。
限制:
该组件没有限制
输入流要求:
组件必须提供输入流。
系统资源考量:
未提供。