[ 
https://issues.apache.org/jira/browse/CAMEL-27399?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen reassigned CAMEL-27399:
-----------------------------------

    Assignee: Claus Ibsen

> 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)

Reply via email to