Skip to content

kafka v2 flusher是否可以支持指定kafka消息内容的key #755

Answered by shalousun
jingliming asked this question in Help
Discussion options

You must be logged in to vote

key是指partitioning key吧,partitioning key是支持的,把ilogtail的消息分发方式改成hash

enable: true
inputs:
  - Type: file_log
    LogPath: /home/test_log
    FilePattern: "*.log"
flushers:
  - Type: flusher_kafka_v2
    PartitionerType: hash  # hash分发
    HashKeys:  # 指定自己的hashkey
      - content.application  
    Brokers:
      - 192.XX.XX.1:9092
      - 192.XX.XX.2:9092
      - 192.XX.XX.3:9092
    Topic: KafkaTestTopic

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by messixukejia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants