You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: This article provides information on using schemas in a schema registry when publishing or consuming events from Azure Event Hubs.
4
4
ms.topic: conceptual
5
5
ms.date: 04/26/2023
@@ -9,27 +9,27 @@ ms.author: spelluru
9
9
10
10
# Client-side schema enforcement
11
11
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 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 (versus the broker/server side).
13
13
14
14
This flow is illustrated as shown:
15
15
16
-
:::image type="content" source="./media/schema-registry-overview/information-flow.svg" alt-text="Image showing the Schema Registry information flow." border="false":::
16
+
:::image type="content" source="./media/schema-registry-overview/information-flow.svg" alt-text="An image shows the schema registry information flow." border="false":::
17
17
18
18
> [!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.
19
+
> The diagram showcases the information flow when event producers and consumers use a schema registry with the Kafka protocol and Avro schema, but the same generally applies when other protocols and schema formats are used.
20
20
>
21
21
22
22
### Producer
23
23
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.
24
+
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.
25
25
26
26
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 auto register the schema with the schema registry if it doesn't exist.
27
27
28
-
1.Then the serializer prepends the schema ID to the serialized data that is published to the Event Hubs.
28
+
1.The serializer prepends the schema ID to the serialized data that is published to the Event Hubs.
29
29
30
30
### Consumer
31
31
32
-
1. Kafka consumer application uses `KafkaAvroDeserializer` to deserialize data that it receives from the event hub.
32
+
1.The Kafka consumer application uses `KafkaAvroDeserializer` to deserialize data that it receives from the event hub.
33
33
34
34
1. The deserializer uses the schema ID (prepended by the producer) to retrieve schema from the schema registry.
0 commit comments