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
| `host` | `String` | `"localhost"` | No | the Redis host name
96
+
| `port` | `int` | `6379` | No | the Redis port
97
+
| `password` | `String` | `""` (empty string) | No | the Redis password
98
+
| `user` | `String` | `"default"` | No | the Redis user
99
+
| `topicName` | `String` | N/A | Yes | the Topic Name
100
+
| `numPartitions` | `int` | N/A | Yes | the number of partitions
101
+
| `flushOnCheckpoint` | `boolean` | `false` | No | whether to flush writes on checkpoint
102
+
| `failedSerializationStreamName` | `String` | `""` (empty string) | No | the stream name to serialization errors to
100
103
|===
101
104
102
105
You then have to initialize the builder and sink to it:
@@ -120,7 +123,17 @@ The `RedisPasssthroughSerializer` and the `RedisMessageDeserializer` are a simpl
120
123
121
124
The `RedisObjectSerializer` and `RedisObjectDeserializer` are generic serializers/deserializers that allow you to work with your standard serializable POJOs.
122
125
You can use these if you want to work with your own objects domain objects, the object is serialized to JSON and added as the
123
-
`data` field of the Stream Message that is sent to Redis.
126
+
`data` field of the Stream Message that is sent to Redis. If you need to add specific modules to the `ObjectMapper` (e.g. `JavaTimeModule`), you can do so by
127
+
passing in an `ObjectMapperSupplier` to the `RedisObjectSerializer` and `RedisObjectDeserializer` constructors. E.g.
128
+
129
+
[source,java]
130
+
----
131
+
RedisObjectSerializer<Person> serializer = new RedisObjectSerializer<>(() -> {
If you use these, you may also want to provide a `RedisKeyExtractor` to extract the key from the object, otherwise, a hashcode extracted from the JSON payload of the object will act as the key.
0 commit comments