SaFi Bank Space : Avro schema management

Status

COMPLETE

Impact

MEDIUM

Driver

Péter Cseh (Unlicensed)

Approver

Juraj Macháč (Unlicensed)

Contributors

Juraj Macháč (Unlicensed) Jan Görig (Unlicensed) Slavomír Kocka (Unlicensed)

Informed

Due date

Resources

(blue star) Relevant data

(blue star) Background

Avro schemas will be used to document APIs and their changes in our Kafka topic to facilitate communication between our microservices. The Avro schemas will be used to generate the code that will be used to produce and consume Kafka messages in the services. This decision is about how we’re managing these schemas and their changes.

(blue star) Options considered

Avro schemas in a single project

Separate project for every schema

Description

Every version of every Avro schema lives in a single project and can be used by referencing a single artifact as a dependency.

Every Avro schema has it’s own project and published as a separate artifact, Consumers reference only the version of the schemas they are consuming directly.

Pros and cons

(plus) Having a single artifact for all the schemas makes development easier

(minus) Having more than one version of the same schema on the classpath

(minus) Release of new artifact versions are coupled

(plus) Clear dependency declaration for every consumed schema with exact version

(plus) Independent versioning for every schema

(minus) More automation is needed to make the creation of new schema projects easy

Estimated cost

LOW

MEDIUM

(blue star) Action items

(blue star) Outcome

We’ll use a common project for every Avro schema we’re using. We’ll ship every schema in a single artifact which the microservices can depend on. More details are under the Kafka topic schema management page