diff --git a/codelabs/schema-registry-beta/codelab.json b/codelabs/schema-registry-beta/codelab.json deleted file mode 100644 index 851c7294..00000000 --- a/codelabs/schema-registry-beta/codelab.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "environment": "web", - "format": "html", - "prefix": "https://storage.googleapis.com", - "mainga": "UA-49880327-14", - "updated": "2025-03-21T21:50:10Z", - "id": "schema-registry-beta", - "duration": 38, - "title": "Introduction to Schema Registry using the Solace Messaging API for Java (JCSMP) and Apicurio Registry", - "summary": "This codelab will walk you through getting started with the Apicurio Registry and the Solace SERDEs components using the Solace Messaging API for Java (JCSMP).", - "source": "main/markdown/schema-registry-beta/schema-registry-beta.md", - "theme": "", - "status": [ - "published" - ], - "category": [ - "solace" - ], - "tags": [ - "web" - ], - "feedback": "https://github.com/SolaceDev/solace-dev-codelabs/blob/master/markdown/schema-registry-beta", - "url": "schema-registry-beta" -} diff --git a/codelabs/schema-registry-beta/img/19a409a4b68aefec.jpg b/codelabs/schema-registry-beta/img/19a409a4b68aefec.jpg deleted file mode 100644 index 9b2a98d5..00000000 Binary files a/codelabs/schema-registry-beta/img/19a409a4b68aefec.jpg and /dev/null differ diff --git a/codelabs/schema-registry-beta/img/354f8ca343e7f6cb.jpg b/codelabs/schema-registry-beta/img/354f8ca343e7f6cb.jpg deleted file mode 100644 index 10a30545..00000000 Binary files a/codelabs/schema-registry-beta/img/354f8ca343e7f6cb.jpg and /dev/null differ diff --git a/codelabs/schema-registry-beta/img/43e621476bd04394.jpg b/codelabs/schema-registry-beta/img/43e621476bd04394.jpg deleted file mode 100644 index 52dbc117..00000000 Binary files a/codelabs/schema-registry-beta/img/43e621476bd04394.jpg and /dev/null differ diff --git a/codelabs/schema-registry-beta/img/44f356558033e250.gif b/codelabs/schema-registry-beta/img/44f356558033e250.gif deleted file mode 100644 index 5364f91e..00000000 Binary files a/codelabs/schema-registry-beta/img/44f356558033e250.gif and /dev/null differ diff --git a/codelabs/schema-registry-beta/img/55f2ea66a1cb12f2.jpg b/codelabs/schema-registry-beta/img/55f2ea66a1cb12f2.jpg deleted file mode 100644 index 91e5fdfe..00000000 Binary files a/codelabs/schema-registry-beta/img/55f2ea66a1cb12f2.jpg and /dev/null differ diff --git a/codelabs/schema-registry-beta/img/7fc4225c303820be.jpg b/codelabs/schema-registry-beta/img/7fc4225c303820be.jpg deleted file mode 100644 index 3b7af654..00000000 Binary files a/codelabs/schema-registry-beta/img/7fc4225c303820be.jpg and /dev/null differ diff --git a/codelabs/schema-registry-beta/img/8fdfc83641421597.jpg b/codelabs/schema-registry-beta/img/8fdfc83641421597.jpg deleted file mode 100644 index e7392c38..00000000 Binary files a/codelabs/schema-registry-beta/img/8fdfc83641421597.jpg and /dev/null differ diff --git a/codelabs/schema-registry-beta/img/a8e88af8691ee4ee.jpg b/codelabs/schema-registry-beta/img/a8e88af8691ee4ee.jpg deleted file mode 100644 index 2ae6a4a2..00000000 Binary files a/codelabs/schema-registry-beta/img/a8e88af8691ee4ee.jpg and /dev/null differ diff --git a/codelabs/schema-registry-beta/img/ae2ff71ecc0caf62.jpg b/codelabs/schema-registry-beta/img/ae2ff71ecc0caf62.jpg deleted file mode 100644 index 38f1e295..00000000 Binary files a/codelabs/schema-registry-beta/img/ae2ff71ecc0caf62.jpg and /dev/null differ diff --git a/codelabs/schema-registry-beta/img/afb336b29e671007.jpg b/codelabs/schema-registry-beta/img/afb336b29e671007.jpg deleted file mode 100644 index 3b93684c..00000000 Binary files a/codelabs/schema-registry-beta/img/afb336b29e671007.jpg and /dev/null differ diff --git a/codelabs/schema-registry-beta/img/c2aa56b2a7de61ea.jpg b/codelabs/schema-registry-beta/img/c2aa56b2a7de61ea.jpg deleted file mode 100644 index 4594675d..00000000 Binary files a/codelabs/schema-registry-beta/img/c2aa56b2a7de61ea.jpg and /dev/null differ diff --git a/codelabs/schema-registry-beta/img/fd43c225f39e0486.jpg b/codelabs/schema-registry-beta/img/fd43c225f39e0486.jpg deleted file mode 100644 index f44fb68c..00000000 Binary files a/codelabs/schema-registry-beta/img/fd43c225f39e0486.jpg and /dev/null differ diff --git a/codelabs/schema-registry-beta/index.html b/codelabs/schema-registry-beta/index.html deleted file mode 100644 index aa1a818e..00000000 --- a/codelabs/schema-registry-beta/index.html +++ /dev/null @@ -1,269 +0,0 @@ - - - - -
- - - -In today's data-driven world, ensuring data consistency and interoperability across different systems is crucial. This is where a schema registry comes into play. In this walkthrough, we'll explore how to use a schema registry (Apicurio Registry) with the Solace JCSMP API, focusing on the Apache Avro format for schema definition.
-You'll learn about:
-✔️ What a schema registry is and why it's important
✔️ What a Serializer and Deserializer (SERDEs) is and the role they play
✔️ How to set up an instance of the Apicurio Registry using Docker Compose
✔️ How to create and register schemas
✔️ How to use schemas in your event-driven applications with Solace's JCSMP API
✔️ Best practices for schema evolution
You can also check out Aaron's office hours covering the schema registry here:
- - - -Schema-Registry-Beta-Package_(latest-version).zip that contains all the necessary pieces you will need. This is available on the Solace Product Portal and unzip it to your preferred directory.NOTE: If you cannot access the Solace Product Portal, please click the Report a mistake at the bottom left of the codelab and open an issue asking for access.
A schema registry is a central repository for managing and storing schemas. It helps ensure data consistency, enables data governance, and supports schema evolution. Here's why it's important:
-A SERDEs (Serializer/Deserializer) in the context of a schema registry is a component that handles two key functions:
-In a schema registry system, SERDEs work closely with schemas to:
-For example:
-This is a fundamental concept in message-based systems where data needs to be:
-We'll use Docker Compose to set up the Apicurio Registry quickly and easily. We've prepared a Docker Compose file that will launch an instance of the Apicurio Registry and all the necessary components with a pre-defined configuration.
-Schema-Registry-Beta-Package. You should see the following files and folders:
solace-schema-registry-dist..env file to change things such as default login or ports. We will leave everything to defaults for this codelab.
docker compose up -d and all the components will start up with the default values configured.localhost:8888 which should re-direct you to the Apicurio Registry login screen.
That's it, you have now installed an instance of the Apicurio Registry with the Postgres storage option!
- - -Let's create a simple schema for a User event:
localhost:8888.sr-developer and password is devPassword.
Create artifact button. Once the dialogue opens enter the following as shown below: solace/samplesAvro Schema

Artifact Metadata step as it is optional and will click Next.Next when done.{
- "namespace": "com.solace.samples.serdes.avro.schema",
- "type": "record",
- "name": "User",
- "fields": [
- {"name": "id", "type": "string"},
- {"name": "name", "type": "string"},
- {"name": "email", "type": "string"}
- ]
-}
-
-
Version Metadata step as it is optional and will simply click the Create button.
You've now created and registered your first schema!
- - -Now, let's see how to use this schema in Java using the Solace Messaging API for Java (JCSMP):
-Schema-Registry-Beta-Package/jcsmp-samples directory.NOTE: For winows users, use the gradlew.bat file instead of gradlew in the below steps.
./gradlew.bat build and . You should see a BUILD SUCCESSFUL message../gradlew.bat runHelloWorldJCSMPAvroSerde --args="localhost:55555 default default".This sample talks to the locally deployed Apicurio Schema Registry and retrieves the schema along with the schema ID. It will then do the following:
-Configures the Serializer and Deserializer:
-// Create and configure Avro serializer and deserializer
- try (Serializer<GenericRecord> serializer = new AvroSerializer<>();
- Deserializer<GenericRecord> deserializer = new AvroDeserializer<>()) {
-
- serializer.configure(getConfig());
- deserializer.configure(getConfig());
-
- /**
- * Returns a configuration map for the Avro serializer and deserializer.
- *
- * @return A Map containing configuration properties
- */
- private static Map<String, Object> getConfig() {
- Map<String, Object> config = new HashMap<>();
- config.put(SchemaResolverProperties.REGISTRY_URL, REGISTRY_URL);
- config.put(SchemaResolverProperties.AUTH_USERNAME, REGISTRY_USERNAME);
- config.put(SchemaResolverProperties.AUTH_PASSWORD, REGISTRY_PASSWORD);
- return config;
- }
-
-Serializes the message payload and publishes the message to the connected broker on solace/samples destination with the serialized payload and schema ID:
// Create and populate a GenericRecord with sample data
- GenericRecord user = initEmptyUserRecord();
- user.put("name", "John Doe");
- user.put("id", "123");
- user.put("email", "support@solace.com");
-
- // Serialize and send the message
- BytesMessage msg = JCSMPFactory.onlyInstance().createMessage(BytesMessage.class);
- SerdeMessage.serialize(serializer, topic, msg, user);
- System.out.printf("Sending Message:%n%s%n", msg.dump());
- producer.send(msg, topic);
-
-It will then receive the published message and deserialize it by looking up the schema ID and retrieving the schema and print it out to console:
- // Set up the message consumer with a deserialization callback
- XMLMessageConsumer cons = session.getMessageConsumer(Consumed.with(deserializer, (msg, genericRecord) -> {
- System.out.printf("Got record: %s%n", genericRecord);
- latch.countDown(); // Signal the main thread that a message has been received
- }, (msg, deserializationException) -> {
- System.out.printf("Got exception: %s%n", deserializationException);
- System.out.printf("But still have access to the message: %s%n", msg.dump());
- latch.countDown();
- }, jcsmpException -> {
- System.out.printf("Got exception: %s%n", jcsmpException);
- latch.countDown();
- }));
- cons.start();
-
-The sourcecode can be further looked at by opening the HelloWorldJCSMPAvroSerde.java file.
As your data model evolves, you'll need to update your schemas. Here are some best practices:
-When updating a schema in Apicurio Registry:
-✔️ Schema registries are crucial for maintaining data consistency in event-driven architectures.
✔️ Apicurio Registry provides a powerful platform for managing schemas.
✔️ Apache Avro is a popular choice for schema definition due to its compact binary format and schema evolution capabilities.
✔️ Solace's JCSMP API can be used effectively with the Apicurio Registry for robust event-driven applications.
✔️ Proper schema evolution practices ensure smooth updates without breaking existing systems.
✔️ Using schemas in your applications helps catch data issues early and improves overall system reliability.
✔️ More schema SERDEs will be made available in the future including JSON.

Thanks for participating in this codelab! Let us know what you thought in the Solace Community Forum! If you found any issues along the way we'd appreciate it if you'd raise them by clicking the Report a mistake button at the bottom left of this codelab.
- - -In today's data-driven world, ensuring data consistency and interoperability across different systems is crucial. This is where a schema registry comes into play. In this walkthrough, we'll explore how to use Solace Schema Registry with the Solace JCSMP API or REST applications, focusing on the JSON format for schema definition.
-You'll learn about:
-✔️ What a schema registry is and why it's important
✔️ What a Serializer and Deserializer (SERDES) is and the role they play
✔️ How to deploy and configure Solace Schema Registry using either Docker Compose or Kubernetes
✔️ How to create and manage schema artifacts in Solace Schema Registry web console
✔️ How to use schemas in your event-driven applications with Solace's JCSMP API or with REST messaging
✔️ Best practices for schema evolution
schema-registry-v1.0.0.tar.gz that contains all the necessary pieces you will need. This is available on the Solace Product Portal.NOTE: If you cannot access the Solace Product Portal, please click the Report a mistake at the bottom left of the codelab and open an issue asking for access.
A schema registry is a central repository for managing and storing schemas. It helps ensure data consistency, enables data governance, and supports schema evolution. Here's why it's important:
-A SERDES (Serializer/Deserializer) in the context of a schema registry is a component that handles two key functions:
-In a schema registry system, SERDES works closely with schemas to:
-For example:
-This is a fundamental concept in message-based systems where data needs to be:
-We'll use Docker Compose to set up the Solace Schema Registry, for local development or standalone use cases with minimal resource and networking requirements. We've prepared a Docker Compose file that will launch an instance of the Solace Schema Registry and all the necessary components with a pre-defined configuration.
-Schema-Registry-V1.0. You should see the following files and folders:
solace-schema-registry-dist.for img in {docker-images}/*.tar.gz; do docker load -i "$img"; done to load docker images. For Window use this instead for %i in (docker-images\*.tar.gz \*.tar.gz) do docker load -i "%i"..env file to change things such as default login or ports. While using the built-in identity provider, we can leave everything to defaults for this codelab.
docker compose -f compose.yaml -f compose.nginx.yaml -f compose.nginx.for.embedded.yaml -f compose.embedded.yaml up -d.localhost:8888 which should re-direct you to the Solace Schema Registry login screen.
That's it, you have now installed an instance of the Solace Schema Registry!
-Alternatively, for enterprise-grade security features, Solace Schema Registry supports external identity providers. For that, make the necessary configurations in your IdP and set the environment variables in your .env file:

Run the following command docker compose -f compose.yaml -f compose.nginx.yaml -f compose.nginx.for.external.yaml -f compose.external.multiple.issuers.yaml up -d.
Alternatively, we can set up Solace Schema Registry on a Kubernetes cluster using Helm.
-NOTE: You must have an existing Kubernetes cluster available (for example, Amazon EKS, Google GKE, Microsoft AKS, or an on-prem/self-managed cluster).
-kubectl to communicate with your cluster.Schema-Registry-V1.0.export REGISTRY="your-registry.com/project"
-for img in {docker-images}/*.tar.gz; do
- LOADED=$(docker load -i "$img" | grep "Loaded image:" | cut -d' ' -f3)
- NEW_NAME="$REGISTRY/$(basename "$img" .tar.gz)"
- docker tag "$LOADED" "$NEW_NAME"
- docker push "$NEW_NAME"
-done
-
-kubectl apply --server-side -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.26/releases/cnpg-1.26.0.yaml.helm upgrade --install schema-registry ./solace-schema-registrykubectl get pods -n solacehttps://ui.Let's create a simple schema for a clock-in-out event:
localhost:8888.sr-developer and password is devPassword.
Create artifact button. Once the dialogue opens enter the following as shown below: solace/samples/clock-in-out/jsonJSON Schema

Artifact Metadata step as it is optional and will click Next.Next when done.{
- "$schema": "http://json-schema.org/draft-07/schema#",
- "title": "clock-in-out",
- "type": "object",
- "additionalProperties": false,
- "properties": {
- "region_code": {
- "description": "region code for clock in or out",
- "type": "string"
- },
- "store_id": {
- "description": "Store identifier",
- "type": "string"
- },
- "employee_id": {
- "description": "Employee ID for who clocked in or out",
- "type": "string"
- },
- "datetime": {
- "description": "Clock time",
- "type": "string",
- "format": "date-time"
- }
- },
- "required": [
- "region_code",
- "store_id",
- "employee_id",
- "datetime"
- ]
-}
-
-
Version Metadata step as it is optional and will simply click the Create button.
You've now created and registered your first schema!
- - -Now, let's see how to use this schema in Java using the Solace Messaging API for Java (JCSMP):
-solace-samples-java-jcsmp directory. With git clone https://github.com/SolaceSamples/solace-samples-java-jcsmp and cd solace-samples-java-jcsmp./gradlew assemble to build the sample.build/staged directory by running cd build/staged and run the sample application with the broker connection details: bin/HelloWorldJCSMPJsonSchemaSerde localhost:55555 default defaultThis sample talks to the locally deployed Solace Schema Registry and retrieves the schema along with the schema ID. It will then do the following:
-Configures the Serializer and Deserializer:
-// Create and configure JSON Schema serializer and deserializer
- try (Serializer<JsonNode> serializer = new JsonSchemaSerializer<>();
- Deserializer<JsonNode> deserializer = new JsonSchemaDeserializer<>()) {
-
- serializer.configure(getConfig());
- deserializer.configure(getConfig());
-
- /**
- * Returns a configuration map for the JSON Schema serializer and deserializer.
- *
- * @return A Map containing configuration properties
- */
- private static Map<String, Object> getConfig() {
- Map<String, Object> config = new HashMap<>();
- config.put(SchemaResolverProperties.REGISTRY_URL, REGISTRY_URL);
- config.put(SchemaResolverProperties.AUTH_USERNAME, REGISTRY_USERNAME);
- config.put(SchemaResolverProperties.AUTH_PASSWORD, REGISTRY_PASSWORD);
- return config;
- }
-
-
-Serializes the message payload and publishes the message to the connected broker on solace/samples/clock-in-out/json destination with the serialized payload and schema ID:
// Create and populate a ClockInOut JsonNode with sample data
- ObjectMapper mapper = new ObjectMapper();
- ObjectNode clockInOut = mapper.createObjectNode();
- clockInOut.put("region_code", "NA-WEST");
- clockInOut.put("store_id", "STORE-001");
- clockInOut.put("employee_id", "EMP-12345");
- clockInOut.put("datetime", "2025-01-20T15:30:00Z");
-
- // Serialize and send the message
- BytesMessage msg = JCSMPFactory.onlyInstance().createMessage(BytesMessage.class);
- SerdeMessage.serialize(serializer, topic, msg, clockInOut);
- System.out.printf("Sending ClockInOut Message:%n%s%n", msg.dump());
- producer.send(msg, topic);
-
-It will then receive the published message and deserialize it by looking up the schema ID and retrieving the schema and print it out to console:
- // Set up the message consumer with a deserialization callback
- XMLMessageConsumer cons = session.getMessageConsumer(Consumed.with(deserializer, (msg, clockInOutData) -> {
- System.out.printf("Got a ClockInOut JsonNode: %s%n", clockInOutData);
- System.out.printf("Employee %s clocked in/out at store %s in region %s at %s%n",
- clockInOutData.get("employee_id").asText(),
- clockInOutData.get("store_id").asText(),
- clockInOutData.get("region_code").asText(),
- clockInOutData.get("datetime").asText());
- latch.countDown(); // Signal the main thread that a message has been received
- }, (msg, deserializationException) -> {
- System.out.printf("Got exception: %s%n", deserializationException);
- System.out.printf("But still have access to the message: %s%n", msg.dump());
- latch.countDown();
- }, jcsmpException -> {
- System.out.printf("Got exception: %s%n", jcsmpException);
- latch.countDown();
- }));
- cons.start();
-
-The sourcecode can be further looked at by opening the HelloWorldJCSMPJsonSchemaSerde.java file.
We can also use this schema with Solace Schema Registry in REST-based messaging environments.
- -With this REST messaging, we will use the following Schema example. You can upload it on Solace Schema Registry as a new artifact with an Artifact Id of solace/samples/json - Refer to Step 7 Creating and Registering Schemas if you need to review the steps.
{
- "$schema": "http://json-schema.org/draft-07/schema#",
- "title": "User",
- "type": "object",
- "customJavaType": "com.solace.samples.serdes.jsonschema.User",
- "additionalProperties": false,
- "properties": {
- "name": {
- "description": "Name of the user",
- "type": "string"
- },
- "id": {
- "description": "Id of the user",
- "type": "string"
- },
- "email": {
- "description": "Email of the user",
- "type": "string",
- "format": "email"
- }
- },
- "required":
- [ "name",
- "id",
- "email"
- ]}
-
-Let's build a Publisher and Consumer sample.
-git clone https://github.com/SolaceSamples/solace-samples-rest-messaging./gradlew build. You should see a BUILD SUCCESSFUL message. Note: For windows users, use the gradlew.bat file instead of gradlew./gradlew runJsonSchemaRestPublisherHttpClient --args="brokerUrl 38080"This sample serializes and publishes by doing the following: Configures the Serializer:
-// Create and configure Json serializer
- try (Serializer<JsonNode> serializer = new JsonSchemaSerializer<>()) {
- serializer.configure(getConfig());
-
- /**
- * Gets the configuration for the serializer.
- * @return A map of configuration properties.
- */
- private static Map<String, Object> getConfig() {
- Map<String, Object> config = new HashMap<>();
- config.put(SchemaResolverProperties.REGISTRY_URL, REGISTRY_URL);
- config.put(SchemaResolverProperties.AUTH_USERNAME, REGISTRY_USERNAME);
- config.put(SchemaResolverProperties.AUTH_PASSWORD, REGISTRY_PASSWORD);
- // This configuration property will populate the SERDES header with a schema ID that is of type String
- config.put(SerdeProperties.SCHEMA_HEADER_IDENTIFIERS, SchemaHeaderId.SCHEMA_ID_STRING);
- return config;
-
-Serializes the HTTP message with payload and headers:
- * Serializes the HTTP message with the given payload and headers.
- Map<String, Object> headers = new HashMap<>();
- byte[] payloadBytes = serializer.serialize(topic, payload, headers);
-
- for (String key : headers.keySet()) {
- Object value = headers.get(key);
- // No Integer/Long to String mapping is needed, as the SERDES schema ID header is already configured as a String.
- // The type parameter is optional. By default all Solace User Properties in a REST message are assumed to have a type "string"
- httpBuilder.header(String.format("%s%s", "Solace-User-Property-", key), value.toString());
- }
-
- if ("JSON".equals(CONTENT_TYPE)) {
- httpBuilder.header("Content-Type", "application/json");
- } else if ("BINARY".equals(CONTENT_TYPE)) {
- httpBuilder.header("Content-Type", "application/octet-stream");
- } else {
- httpBuilder.header("Content-Type", CONTENT_TYPE);
- }
- return httpBuilder.POST(HttpRequest.BodyPublishers.ofByteArray(payloadBytes));
-
-
-Publishes the message to specific topic:
-//Publishes a message to a specific topic
- ObjectNode user = new ObjectMapper().createObjectNode();
- try {
- String url = String.format("http://%s:%d/TOPIC/%s", brokerHost, port, topic);
- HttpRequest.Builder httpBuilder = HttpRequest.newBuilder().uri(URI.create(url));
-
- user.put("name", "John Doe");
- user.put("id", id);
- user.put("email", "support@solace.com");
-
- HttpRequest request = serializeHttpMessage(httpBuilder, serializer, topic, user).build();
-
- HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
-
- System.out.println("Published message with status: " + response.statusCode());
- System.out.println("Published message with record: " + user);
-
-solace/samples/json and configure RDP client as mentioned above. REST consumer samples start a local HTTP server that listens for incoming POST requests from a Solace broker's REST Delivery Point (RDP).Configure Solace Rest Delivery Point 1. Create Queue
-
2. Create Rest Delivery Point
3. Create REST Consumer
4. Create Queue Binding
5. Specify Queue Binding Endpoint
Make sure all of the RDP components are enabled.
./gradlew runJsonSchemaRestConsumer --args="/my-rest-endpoint 8080 X-Solace-Topic"Configures the Deserializer:
-// Create and configure Json deserializer
-Deserializer<User> deserializer = new JsonSchemaDeserializer<>()) {
- deserializer.configure(getDeserializerConfig());
-
-Returns a map of configuration properties for the deserializer.
- *
- * @return a map of configuration properties for the deserializer
- */
- private static Map<String, Object> getDeserializerConfig() {
- HashMap<String,Object> config = new HashMap<>();
- config.put(SchemaResolverProperties.REGISTRY_URL, REGISTRY_URL);
- config.put(SchemaResolverProperties.AUTH_USERNAME, REGISTRY_USERNAME);
- config.put(SchemaResolverProperties.AUTH_PASSWORD, REGISTRY_PASSWORD);
- config.put(JsonSchemaProperties.TYPE_PROPERTY, "customJavaType");
- return config;
-
-It will receive the published message from http headers and deserialize it and retrieving the schema and print it out:
- // Handles a SERDES message.
- Headers httpHeaders = exchange.getRequestHeaders();
-
- // Read the message body
- InputStream is = exchange.getRequestBody();
- byte[] messagePayload = is.readAllBytes();
-
- // extract SERDES headers from http headers
- Map<String, Object> serdesHeaders = getSerdesHeaders(httpHeaders);
- // deserialize with topic, payload and SERDES headers
- T object = deserializer.deserialize(optionalTopic.orElse(""), messagePayload, serdesHeaders);
-
- System.out.printf("%n- - - - - - - - - - RECEIVED SERDES MESSAGE - - - - - - - - - -%n");
- printAllHeaders(httpHeaders);
- System.out.println("BodyBytesLength: " + messagePayload.length);
- System.out.println("Body: " + objectToStringFunc.apply(object));
- System.out.printf("- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -%n");
-
-
-
- As your data model evolves, you'll need to update your schemas. Here are some best practices:
-When updating a schema in Solace Schema Registry:
-✔️ Schema registries are crucial for maintaining data consistency in event-driven architectures.
✔️ Solace Schema Registry provides a powerful platform for managing schemas.
✔️ Solace's JCSMP API can be used effectively with the Solace Schema Registry for robust event-driven applications.
✔️ Proper schema evolution practices ensure smooth updates without breaking existing systems.
✔️ Using schemas in your applications helps catch data issues early and improves overall system reliability.
✔️ Solace Schema Registry supports built-in authentication as well as external identity providers for enterprise environments. ✔️ Solace Schema Registry currently supports Avro and JSON Schema. More schema SERDES will be made available in the future.

Thanks for participating in this codelab! Let us know what you thought in the Solace Community Forum! If you found any issues along the way we'd appreciate it if you'd raise them by clicking the Report a mistake button at the bottom left of this codelab.
- - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-