I am developing an application(B) which uses Schema Registry and allows clients(A) to send data to any other platform(C). General design: Client A -> Platform B -> Destination C
So I am not necessarily publishing messages to kafka.
- Is there any documentation on how to integrate and use Schema registry with a custom application which is not publishing to kafka? All the documentation I could find is around using registry with kafka.
- For this setup, I am finding it difficult to finalize the serialization format to use- if I use avro/protobuf, it requires a corresponding class/message in application B. This means clients will need to update B every time a new schema is added or an old one updated. For JSON, such a class should not be needed (I guess?) since it is schemaless.
CodePudding user response:
What is the intended schema format for your solution? If a binary structured format, then serializing key/value (Java Objects - > byte Array), you definitely need a Schema Registry integrated in your application.
Refer : https://docs.confluent.io/platform/current/schema-registry/index.html
Again for #2, Schema Registry provides you a better Schema Management capability in terms of Schema Evolution and compatibility checks, so you need not to worry much about updating your KAFKA Clients whenever a schema evolves.
CodePudding user response:
All the documentation I could find is around using registry with kafka
Because the Confluent Registry stores schemas in a Kafka topic. So, you'll therefore need a Kafka installation, even if it is not used by your services. Note: There are other Schema Registry implementations.
finding it difficult to finalize the serialization format to use
Doesn't really matter; the Confluent Registry also supports defining your own. What actually matters is how supported that format is within your clients. E.g. Avro support in Golang or .NET isn't the greatest.
requires a corresponding class/message in application B. This means clients will need to update B every time a new schema is added or an old one updated
So? Do you never upgrade other 3rd party libraries for new methods/fixes? Why would you treat your schemas any different?
The Registry enforces backwards compatible changes, by default. Schema upgrades aren't required unless you actually need the new data being sent.
For JSON, such a class should not be needed (I guess?) since it is schemaless
The Confluent Schema Registry uses JSONSchema, so it is not schemaless.
any documentation on how to integrate and use Schema registry with a custom application which is not publishing to kafka
You'd use the REST API directly.