Incorrect artifact createdOn and modifiedOn date when using Kafka topic storage
See original GitHub issueWhen using the Kafka topic storage, Apicurio sets the artifact createdOn
and modifiedOn
metadata fields using the current system timestamp when the record was read out of Kafka (see (1) and (2)). This means that when a server restarts it will return different metadata for the same backing data. It also means that a cluster of Apicurio servers will each return different metadata for the same artifact.
Alternatives would be to use the Kafka record timestamps (so the createdOn
field would match the time that the record was originally produced), or store the timestamps as part of the metadata object.
(1) https://github.com/Apicurio/apicurio-registry/blob/54d82c269c6f57be4f80c7bae4a9b00dfe789ffd/app/src/main/java/io/apicurio/registry/storage/impl/AbstractMapRegistryStorage.java#L209-L211 (2) https://github.com/Apicurio/apicurio-registry/blob/a077f18c541f22bc04251532d4a8f967287372a7/storage/kafka/src/main/java/io/apicurio/registry/kafka/KafkaRegistryStorage.java#L334-L339
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
Yes, this is Kafka storage only. Even if deprecated, it should still be fixed – and @ajborley suggestion with the record timestamp looks OK.
Please @alesj, correct me if I’m wrong, but I think this only applies to the Kafka storage.