You are viewing the documentation for the container-native version of IBM Event Streams.
Looking for the managed service on IBM Cloud? Click here.

Using the schema API

Event Streams provides a serdes Java library to enable Kafka applications to serialize and deserialize messages using schemas stored in Apicurio Registry in Event Streams. Using the Event Streams serdes library API, schema versions are automatically downloaded from your Apicurio Registry in Event Streams, checked to see if they are in a disabled or deprecated state, and cached. The schemas are used to serialize messages produced to Kafka and deserialize messages consumed from Kafka.

Schemas downloaded by the Event Streams serdes library API are cached in memory with a 10 minute expiration period. This means that if a schema is deprecated or disabled, it might take 10 minutes before consuming or producing applications will see the change. To change the expiration period, set the SchemaRegistryConfig.PROPERTY_SCHEMA_CACHE_REFRESH_RATE configuration property to a new milliseconds value.

For more details, including code snippets that use the schema registry serdes API, see setting Java applications to use schemas.

For full details of the Event Streams schema registry serdes API, see the Schema API Javadoc.