Introducing caching
Fix #832 #752 Adds caching capabilities to the converter. Remote calls to the registry, Schema Parsing and toString were very expensive operations that are now being cached Adds a decorator to the registryClient that allows caching of remote invocations. Fixing review comments
This commit is contained in:
committed by
Marius Bogoevici
parent
a67fe02fd7
commit
4cd9b0c3ec
@@ -1577,6 +1577,13 @@ A client for the Spring Cloud Stream schema registry can be configured using the
|
||||
}
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
The default converter is optimized to cache not only the schemas from the remote server but also the `parse()` and `toString()` methods that are quite expensive.
|
||||
Because of this, it uses a `DefaultSchemaRegistryClient` that does not caches responses. If you intend to use the client directly on your code, you can request a bean that also caches responses to be created.
|
||||
To do that, just add the property `spring.cloud.stream.schemaRegistryClient.cached=true` to your application properties.
|
||||
====
|
||||
|
||||
==== Avro Schema Registry Client Message Converters
|
||||
|
||||
For Spring Boot applications that have a `SchemaRegistryClient` bean registered with the application context, Spring Cloud Stream will auto-configure an Apache Avro message converter that uses the schema registry client for schema management.
|
||||
|
||||
Reference in New Issue
Block a user