[
https://issues.apache.org/jira/browse/CAMEL-27399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-27399.
---------------------------------
Resolution: Fixed
Fixed in https://github.com/apache/camel/pull/30618 (commit
4ad0b6105305e3dc5ee617ac34e2814f8a85f7a4 on main), for 4.24.0.
_Claude Code on behalf of davsclaus_
> 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
> Assignee: Claus Ibsen
> Priority: Minor
> 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)