Skip to content

Update Python docs to with correct timestamp granularity  #384

Closed
@rnpridgeon

Description

@rnpridgeon

Description

Python documentation incorrectly states that the timestamp field should use microseconds. If we take a look at rdkafka.h however we can see that the expected unit is actually Milliseconds

Python Docs
https://docs.confluent.io/current/clients/confluent-kafka-python/#confluent_kafka.Producer.produce

rdkafka.h
https://github.com/edenhill/librdkafka/blob/13befa7053c43593fd6f2effdffbd83c3ea52eb7/src/rdkafka.h#L804

This will ultimately cause issues from Kafka as the broker will actually record this timestamp which will break things

https://issues.apache.org/jira/browse/KAFKA-6939

How to reproduce

produce a message with a timestamp with microsecond granularity.

Checklist

Please provide the following information:

  • confluent-kafka-python and librdkafka version (confluent_kafka.version() and confluent_kafka.libversion()):
  • Apache Kafka broker version:
  • Client configuration: {...}
  • Operating system:
  • Provide client logs (with 'debug': '..' as necessary)
  • Provide broker log excerpts
  • Critical issue

Metadata

Metadata

Assignees

Labels

bugReporting an unexpected or problematic behavior of the codebase

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions