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
Preserving each individual header requires explicit registration of patterns that designate the header as multi‑valued.
225
194
226
195
`DefaultKafkaHeaderMapper#setMultiValueHeaderPatterns(String... patterns)` accepts a list of patterns, which can be either wildcard expressions or exact header names.
@@ -241,18 +210,9 @@ Any header whose name matches one of the supplied patterns is
241
210
* **Producer side:** written as separate Kafka headers, one per element.
242
211
* **Consumer side:** collected into a `List<?>` that contains the individual header values; each element is returned to the application **after the usual deserialization or type conversion performed by the configured `HeaderMapper`.**
243
212
244
-
[NOTE]
245
-
====
246
-
Regular expressions are *not* supported; only the `*` wildcard is allowed in simple patterns—supporting direct equality and forms such as:
247
-
248
-
- `xxx*`
249
-
- `*xxx`
250
-
- `*xxx*`
251
-
- `xxx*yyy`
252
-
====
213
+
NOTE: Regular expressions are *not* supported; only the +*+ wildcard is allowed in simple patterns—supporting direct equality and forms such as: +xxx*+, +*xxx+, +*xxx*+, +xxx*yyy+.
253
214
254
215
[IMPORTANT]
255
216
====
256
-
All elements collected under the same multi‑value header **must be of the same Java type**.
257
-
Mixing, for example, `String` and `byte[]` values under a single header key is not supported and will lead to a conversion error.
217
+
On the *Producer Side*, When `DefaultKafkaHeaderMapper` serializes a multi-value header, every element in that collection must be of a single Java type—mixing, for example, `String` and `byte[]` values under a single header key will lead to a conversion error.
0 commit comments