Claus Ibsen created CAMEL-27399:
-----------------------------------
Summary: camel-debezium - DebeziumTypeConverter.toMap keeps the
order of the fields of the Struct
Key: CAMEL-27399
URL: https://issues.apache.org/jira/browse/CAMEL-27399
Project: Camel
Issue Type: Improvement
Components: camel-debezium
Reporter: Claus Ibsen
Fix For: 4.24.0
{{DebeziumTypeConverter.toMap(Struct)}} builds a {{HashMap}} (also for nested
Structs and maps), so the order of the columns of the table is lost when the
Map is marshalled to JSON:
{noformat}
{"added":"...","price":9.95,"name":"camel","id":1}
{noformat}
Expected: a {{LinkedHashMap}}, in the order of the fields of the Struct's
schema, so the JSON has the columns in the order of the table ({{id}},
{{name}}, {{price}}, {{added}}). A unit test checks the order, nested Structs
included.
Found while adding the debezium-postgresql-source Kamelet to the Kamelet
catalog (apache/camel-kamelets#3363, 2026-11-22).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)