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
* Correct serialization.md
* Reorder Serializers API table of contents.
Put Quix serializers at the bottom as it is headed towarda deprecation.
* Add Schema Registry to Serializers API table of contents
* Add dedicated Schema Registry documentation
Serializers and deserializers for JSON Schema, Avro, and Protobuf support integration with a Schema Registry.
4
+
5
+
The current implementation wraps Confluent's serializers and deserializers, which are tightly coupled with the Schema Registry.
6
+
7
+
To integrate your existing Schema Registry, pass `SchemaRegistryClientConfig` to your serializers and deserializers. Additional optional configuration can be provided via `SchemaRegistrySerializationConfig`.
See the [Serialization and Deserialization](./serialization.md) page to learn more about how to integrate the serializer and deserializer with your application.
Copy file name to clipboardExpand all lines: docs/advanced/serialization.md
+22-25Lines changed: 22 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Serialization and Deserialization
2
2
3
-
Quix Streams supports multiple serialization formats to exchange data between Kafka topics:
3
+
Quix Streams supports multiple serialization formats for exchanging data between Kafka topics:
4
4
5
5
-`bytes`
6
6
-`string`
@@ -10,20 +10,22 @@ Quix Streams supports multiple serialization formats to exchange data between Ka
10
10
-`avro`
11
11
-`protobuf`
12
12
13
-
The serialization settings are defined per-topic using these parameters of `Application.topic()` function:
13
+
The serialization settings are defined pertopic using these parameters of the`Application.topic()` function:
14
14
15
15
-`key_serializer`
16
16
-`value_serializer`
17
17
-`key_deserializer`
18
18
-`value_deserializer`
19
19
20
-
By default, message values are serialized with `json` and message keys are serialized with `bytes` (i.e. passed as they are received from Kafka).
20
+
By default, message values are serialized with `json`, and message keys are serialized with `bytes` (i.e., passed as they are received from Kafka).
21
21
22
-
Note: The legacy `quix` serializer and legacy `quix_events` and `quix_timeseries` deserializers are still supported but may be deprecated in future. New stream processing applications should avoid using these 3 formats.
22
+
**Note:** JSON Schema, Avro, and Protobuf serialization formats support integration with a Schema Registry. See the [Schema Registry](./schema-registry.md) page to learn more.
23
+
24
+
**Note:** The legacy `quix` serializer and legacy `quix_events` and `quix_timeseries` deserializers are still supported but may be deprecated in the future. New stream processing applications should avoid using these three formats.
23
25
24
26
## Configuring Serialization
25
-
To set a serializer, you may either pass a string shorthand for it, or an instance of `quixstreams.models.serializers.Serializer` and `quixstreams.models.serializers.Deserializer` directly
26
-
to the `Application.topic()`.
27
+
28
+
To set a serializer, you can either pass a string shorthand for it or an instance of `quixstreams.models.serializers.Serializer` and `quixstreams.models.serializers.Deserializer` directly to the `Application.topic()` function.
Apache Avro is a row-based binary serialization format data. Avro stores the schema in JSON format alongside the data, enabling efficient processing and schema evolution.
80
78
81
-
You can learn more the Apache Avro format [here](https://avro.apache.org/docs/).
82
-
The Avro serializer and deserializer need to be passed explicitly.
79
+
Apache Avro is a row-based binary serialization format. Avro stores the schema in JSON format alongside the data, enabling efficient processing and schema evolution.
83
80
84
-
In the current version, the schema must be provided manually.
81
+
You can learn more about the Apache Avro format [here](https://avro.apache.org/docs/).
82
+
The Avro serializer and deserializer need to be passed explicitly and must include the schema.
85
83
86
-
> ***WARNING***: Avro serializer and deserializer require the `fastavro` library.
87
-
> You can install quixstreams with the necessary dependencies using
84
+
> **WARNING**: The Avro serializer and deserializer require the `fastavro` library.
85
+
> You can install Quix Streams with the necessary dependencies using:
By default the protobuf deserializer will deserialize the message to a python dictionary. Doing it has a big performance impact. You can disable this behavior by initializing the deserializer with `to_dict` set to `False`. The protobuf message object will then be used as the message value limiting the available StreamingDataframe API.
129
+
By default, the Protobuf deserializer will deserialize the message to a Python dictionary. Doing this has a big performance impact. You can disable this behavior by initializing the deserializer with `to_dict` set to `False`. The Protobuf message object will then be used as the message value, limiting the available StreamingDataframe API.
0 commit comments