简体   繁体   中英

Which time value gets assigned to kafka record message.timestamp (kafka-python library)?

在 kafka-python 库的官方文档中,实际上没有任何关于分配给消费记录.timestamp属性的值的内容。

The value of this Kafka timestamp depends on the log.message.timestamp.type broker configuration (see https://kafka.apache.org/documentation/#log.message.timestamp.type ), which can be set to CreateTime (ie client producer timestamp) or LogAppendTime (ie broker timestamp).

Here's an extract of the producer client documentation that clarifies it:

If CreateTime is used by the topic, the timestamp will be the user provided timestamp or the record send time if the user did not specify a timestamp for the record. If LogAppendTime is used for the topic, the timestamp will be the Kafka broker local time when the message is appended.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM