Skip to content

Commit 3fe6c73

Browse files
authored
Merge pull request #293108 from LHL407/two-schema-registry-articles
[AQ] edit pass: Two schema registry articles
2 parents 9088b55 + f4d9c20 commit 3fe6c73

File tree

2 files changed

+104
-93
lines changed

2 files changed

+104
-93
lines changed
Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Client-side schema enforcement - Schema Registry
2+
title: Client-Side Schema Enforcement - Schema Registry
33
description: This article provides information on using schemas in a schema registry when publishing or consuming events from Azure Event Hubs.
44
ms.topic: conceptual
55
ms.date: 04/26/2023
@@ -9,30 +9,32 @@ ms.author: spelluru
99

1010
# Client-side schema enforcement
1111

12-
Client-side schema enforcement ensures that the data sent by the producer application and received by the consumer application is validated against the schemas defined in the Schema Registry on the client side itself (that is, rather than on the broker/server side).
12+
Client-side schema enforcement ensures that data is validated against schemas defined in the schema registry on the client side rather than the broker/server side. The producer application can use schemas to validate and serialize data before sending the data to an event hub. Similarly, a consumer application can deserialize and validate data after it receives events from an event hub.
1313

14-
This flow is illustrated as shown -
14+
Client-side schema enforcement ensures that data is validated on the client side. The producer application sends the data, and the consumer application receives it. That data is validated against schemas defined in the schema registry on the client side rather than the broker/server side.
1515

16-
:::image type="content" source="./media/schema-registry-overview/information-flow.svg" alt-text="Image showing the Schema Registry information flow." border="false":::
16+
This diagram illustrates the flow:
17+
18+
:::image type="content" source="./media/schema-registry-overview/information-flow.svg" alt-text="Diagram that shows the schema registry information flow." border="false":::
1719

1820
> [!NOTE]
19-
> While the diagram showcases the information flow when event producers and consumers use Schema Registry with the **Kafka** protocol and **Avro** schema, it doesn't really change for other protocols and schema formats.
21+
> The diagram showcases the information flow when event producers and consumers use a schema registry with the Kafka protocol and Avro schema. Other protocols and schema formats work in a similar way.
2022
>
2123
22-
### Producer
24+
### Producer
2325

24-
1. Kafka producer application uses `KafkaAvroSerializer` to serialize event data using the specified schema. Producer application provides details of the schema registry endpoint and other optional parameters that are required for schema validation.
26+
1. The Kafka producer application uses `KafkaAvroSerializer` to serialize event data by using the specified schema. The producer application provides details of the schema registry endpoint and other optional parameters that are required for schema validation.
2527

26-
2. The serializer looks for the schema in the schema registry to serialize event data. If it finds the schema, then the corresponding schema ID is returned. You can configure the producer application to auto register the schema with the schema registry if it doesn't exist.
28+
1. The serializer looks for the schema in the schema registry to serialize event data. If it finds the schema, then the corresponding schema ID is returned. You can configure the producer application to automatically register the schema with the schema registry if it doesn't exist.
2729

28-
3. Then the serializer prepends the schema ID to the serialized data that is published to the Event Hubs.
30+
1. The serializer prepends the schema ID to the serialized data that's published to the event hub.
2931

30-
### Consumer
32+
### Consumer
3133

32-
1. Kafka consumer application uses `KafkaAvroDeserializer` to deserialize data that it receives from the event hub.
34+
1. The Kafka consumer application uses `KafkaAvroDeserializer` to deserialize data that it receives from the event hub.
3335

34-
2. The deserializer uses the schema ID (prepended by the producer) to retrieve schema from the schema registry.
36+
1. The deserializer uses the schema ID (prepended by the producer) to retrieve the schema from the schema registry.
3537

36-
3. The deserializer uses the schema to deserialize event data that it receives from the event hub.
38+
1. The deserializer uses the schema to deserialize event data that it receives from the event hub.
3739

38-
4. The schema registry client uses caching to prevent redundant schema registry lookups in the future.
40+
1. The schema registry client uses caching to prevent redundant schema registry lookups in the future.

0 commit comments

Comments
 (0)