Skip to content

SourceRecordReader implementations should use milliseconds to create their records #15

Closed
@ahawtho

Description

@ahawtho

Kafka record timestamps are defined in milliseconds, but the StreamSourceRecordReader class and the KeySourceRecordReader class use the following to create their records:

		return new SourceRecord(..., Instant.now().getEpochSecond());

These should be switched to Instant.now().toEpochMilli().

The effect is that when the source connector appends a message to a topic, if the topic has retention.ms set to a reasonable value, the messages are immediately deleted from the topic.

This can be worked around by setting the topic configuration value:

message.timestamp.type: LogAppendTime

Metadata

Metadata

Assignees

No one assigned

    Labels

    releasedIssue has been released

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions