confluent kafka topic consume

説明

Kafka のトピックからメッセージを消費します。

confluent kafka topic consume <topic> [flags]

フラグ

    --group string          Consumer group ID. (default "confluent_cli_consumer_<uuid>")
-b, --from-beginning        Consume from beginning of the topic.
    --value-format string   Format of message value as string, avro, protobuf, or jsonschema. Note that schema references are not supported for avro. (default "string")
    --print-key             Print key of the message.
    --delimiter string      The key/value delimiter. (default "\t")
    --sr-endpoint string    Endpoint for Schema Registry cluster.
    --sr-apikey string      Schema registry API key.
    --sr-apisecret string   Schema registry API key secret.
    --api-key string        API key.
    --api-secret string     API key secret.
    --cluster string        Kafka cluster ID.
    --context string        CLI context name.
    --environment string    Environment ID.

グローバルフラグ

-h, --help            Show help for this command.
-v, --verbose count   Increase verbosity (-v for warn, -vv for info, -vvv for debug, -vvvv for trace).

my_topic トピックから項目を消費し、Ctrl + C キーを押して終了します("+" はキーを同時に押すことを意味します)。

confluent kafka topic consume -b my_topic

関連情報