question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incorrect artifact createdOn and modifiedOn date when using Kafka topic storage

See original GitHub issue

When 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:closed
  • Created 3 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
alesjcommented, Aug 4, 2020

Yes, this is Kafka storage only. Even if deprecated, it should still be fixed – and @ajborley suggestion with the record timestamp looks OK.

0reactions
carlesarnalcommented, Aug 4, 2020

Please @alesj, correct me if I’m wrong, but I think this only applies to the Kafka storage.

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Common Pitfalls When Using Apache Kafka - Confluent
When executing producer.send() , the hope is that records go through and are successfully stored in a topic. The reality is that, ...
Read more >
Chapter 14, Service Registry artifact reference
This chapter provides details on the supported artifact types, states, metadata, and content rules that are stored in Service Registry.
Read more >
Documentation - Apache Kafka
A consumer instance sees records in the order they are stored in the log. For a topic with replication factor N, we will...
Read more >
Event Streams schema registry - IBM Cloud Docs
Producers and consumers validate the data against the specified schema that is stored in the schema registry (in addition to going through Kafka...
Read more >
ERROR Error when sending message to topic - Stack Overflow
Instead of changing server.properties include the address 0.0.0.0 in the code itself. Instead of /usr/bin/kafka-console-producer --broker-list Hostname:9092 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found