Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

message consumed by pykafka simpleconsumer has timestamp value 0 #990

Open
ipavlyshyn opened this issue Jan 16, 2020 · 0 comments
Open

message consumed by pykafka simpleconsumer has timestamp value 0 #990

ipavlyshyn opened this issue Jan 16, 2020 · 0 comments

Comments

@ipavlyshyn
Copy link

PyKafka version: 2.8.0
Kafka version: kafka_2.12-2.2.0.jar
Message has LogAppendTime on kafka server but after consuming it by pykafka simpleconsumer message timestamp = 0

Output from kafka-console-consumer

kafka:~$ ~/kafka/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic http --from-beginning --property "print.timestamp=true" --property 'print.key=true'
LogAppendTime:1579164671511 ypohtzfvrn.net:1:1 "test"

Output from pykafka client

(Pdb++) consumer
<pykafka.simpleconsumer.SimpleConsumer at 0x7f79c0260860 (consumer_group=None)>
(Pdb++) msg
<pykafka.protocol.message.Message object at 0x7f79c0cf1318>
(Pdb++) msg.timestamp
0
(Pdb++) msg.value.decode("utf-8")
'"test"
(Pdb++) consumer.topic.name.decode("utf8")
'http'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant