fgeller/kt

Timestamps are not added when producing

fuyar opened this issue · 3 comments

fuyar commented

Hello,

When producing with kt, record timestamps (available since Kafka 0.10) are not specified.
Here's an example with what kafkacat is producing.

{"partition": 0,"offset": 0, "timestamp": -1, "key": test, "value": NULL}

echo 'test:' | kafkacat -P -b dbpoc-03 -t test_timestamp -K: -Z -p -1
{"partition": 4,"offset": 0, "timestamp": 1544028030676, "key": test, "value": NULL}

Also kt is not using the default partitioner (the one from Kafka) ?

will try to get around to that in the coming days, thanks for reporting!

re partitioner: yep, last i checked there was no go implementation of the partitioner, maybe that has changed? the produce command allows you to use a hashCode partitioner which was the "old" way of partitioning (forgot the kafka version when it changed).

hey @fuyar got around to adding the timestamp bit today - let me know if you run into any issues - and added a new issue to check again on a default partitioner implementation in go.

closing this optimistically, feel free to re-open!

fuyar commented

Just a heads-up : timestamp is now correctly filled upon producing !

Thanks @fgeller ;)