diff --git a/spring-cloud-stream-schema/src/main/java/org/springframework/cloud/stream/schema/client/CachingRegistryClient.java b/spring-cloud-stream-schema/src/main/java/org/springframework/cloud/stream/schema/client/CachingRegistryClient.java index e661b3f17..304c06fc0 100644 --- a/spring-cloud-stream-schema/src/main/java/org/springframework/cloud/stream/schema/client/CachingRegistryClient.java +++ b/spring-cloud-stream-schema/src/main/java/org/springframework/cloud/stream/schema/client/CachingRegistryClient.java @@ -47,8 +47,8 @@ public class CachingRegistryClient implements SchemaRegistryClient { @Override public SchemaRegistrationResponse register(String subject, String format, String schema) { SchemaRegistrationResponse response = delegate.register(subject, format, schema); - cacheManager.getCache(ID_CACHE).put(response.getSchemaReference(), schema); - cacheManager.getCache(REF_CACHE).put(response.getId(), schema); + cacheManager.getCache(ID_CACHE).put(response.getId(), schema); + cacheManager.getCache(REF_CACHE).put(response.getSchemaReference(), schema); return response; }