zoukankan      html  css  js  c++  java
  • 【转】SENDING KEY VALUE MESSAGES WITH THE KAFKA CONSOLE PRODUCER

    SENDING KEY VALUE MESSAGES WITH THE KAFKA CONSOLE PRODUCER

    When working with Kafka you might find yourself using the kafka-console-producer (kafka-console-producer.sh). The kafka-console-producer is a program included with Kafka that creates messages from command line input (STDIN).

    However, simply sending lines of text will result in messages with null keys. In order to send messages with both keys and values you must set the parse.key and key.separator properties on the command line when running the producer.

    The below example sets the parse.key property to true, and specifies the key.separator as “:“. The keys in the sample messages below are “key1”, “key2”, “key3”, with the values being “value1”, “value2”, “value3”.

    If you haven’t installed Kafka yet, see our Kafka Quickstart Tutorial to get up and running quickly.

  • 相关阅读:
    浏览器默认样式
    display
    JS中的!=、== 、!==、===的用法和区别。
    getElementsByName
    让DIV的滚动条自动滚动到最底部
    uoj118 【UR #8】赴京赶考
    [MtOI2019]幽灵乐团
    uoj213 【UNR #1】争夺圣杯
    loj6198 谢特
    [CTSC2017]密钥
  • 原文地址:https://www.cnblogs.com/oxspirt/p/11510216.html
Copyright © 2011-2022 走看看