This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new 234dab2b7 chore: debezium-postgresql-source says a missing offset 
folder fails the start and the columns keep their order (CAMEL-27398, 
CAMEL-27399) (#3371)
234dab2b7 is described below

commit 234dab2b7b0ca6bd65aef6206b48276d017aa0f5
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Nov 23 13:35:44 2026 +0100

    chore: debezium-postgresql-source says a missing offset folder fails the 
start and the columns keep their order (CAMEL-27398, CAMEL-27399) (#3371)
    
    With Camel 4.24 (apache/camel#30618), the folder of offsetStorageFileName 
must
    exist and be writable or the consumer fails at startup, and the JSON has the
    columns in the order of the table. The snapshot check of the test now 
compares
    the JSON as text, so the order is tested.
    
    
    Claude-Session: https://claude.ai/code/session_016Y4dDmBDsSWV117kccuNf9
    
    Co-authored-by: Claude Opus 5.5 <[email protected]>
---
 kamelets/debezium-postgresql-source.kamelet.yaml                    | 6 +++---
 .../camel-kamelets/src/main/resources/META-INF/kamelets-index.json  | 2 +-
 .../main/resources/kamelets/debezium-postgresql-source.kamelet.yaml | 6 +++---
 .../debezium/debezium-postgresql-source-route.citrus.it.yaml        | 4 +++-
 4 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/kamelets/debezium-postgresql-source.kamelet.yaml 
b/kamelets/debezium-postgresql-source.kamelet.yaml
index b38a8d578..2f7425610 100644
--- a/kamelets/debezium-postgresql-source.kamelet.yaml
+++ b/kamelets/debezium-postgresql-source.kamelet.yaml
@@ -36,9 +36,9 @@ spec:
 
       Use it to pass the changes of a database on to another system as they 
happen, for example to keep a search index or a cache up to date, or to copy 
new orders to a queue, without polling the tables. To read rows with a query 
again and again, use `postgresql-source`.
 
-      Output: the body is JSON text in bytes, an object with the column names 
as keys, such as `{"id":1,"name":"Tea","price":4.50}`: the row after the 
change, and for a delete the row before it. The columns can come in any order. 
A `NUMERIC` column is a JSON number with its decimals, such as `4.50`, and a 
`DATE` column the number of days since 1970-01-01, such as `20454` for 
2026-01-01. The `debezium-operation` header says what happened: `c` (insert), 
`u` (update), `d` (delete) or `r` (a [...]
+      Output: the body is JSON text in bytes, an object with the column names 
as keys, such as `{"id":1,"name":"Tea","price":4.50}`: the row after the 
change, and for a delete the row before it. The columns are in the order of the 
table. A `NUMERIC` column is a JSON number with its decimals, such as `4.50`, 
and a `DATE` column the number of days since 1970-01-01, such as `20454` for 
2026-01-01. The `debezium-operation` header says what happened: `c` (insert), 
`u` (update), `d` (delete) o [...]
 
-      Good to know: the server must run with `wal_level=logical`, and the user 
needs the `REPLICATION` attribute and the right to read the tables. On the 
first start, the Kamelet creates a replication slot named `slotName` and a 
publication named `publicationName` in the database, and by default sends every 
row of the tables first (`snapshotMode`). It saves how far it got in the file 
`offsetStorageFileName`, or in a Kafka topic, when it stops and once a minute 
while it runs, and after a  [...]
+      Good to know: the server must run with `wal_level=logical`, and the user 
needs the `REPLICATION` attribute and the right to read the tables. On the 
first start, the Kamelet creates a replication slot named `slotName` and a 
publication named `publicationName` in the database, and by default sends every 
row of the tables first (`snapshotMode`). It saves how far it got in the file 
`offsetStorageFileName`, or in a Kafka topic, when it stops and once a minute 
while it runs, and after a  [...]
     required:
       - serverName
       - username
@@ -118,7 +118,7 @@ spec:
         default: pgoutput
       offsetStorageFileName:
         title: Position File
-        description: The file where the Kamelet saves how far it got, such as 
`/data/offsets.dat`, read again after a restart. It is created when it does not 
exist, but its folder must exist, or nothing is saved. A relative name is in 
the folder the integration runs in. When it is lost, the changes are sent again 
as on the first start. Not used when `offsetStorage` is the Kafka store.
+        description: The file where the Kamelet saves how far it got, such as 
`/data/offsets.dat`, read again after a restart. It is created when it does not 
exist, but its folder must exist and be writable, or the Kamelet fails to 
start. A relative name is in the folder the integration runs in. When it is 
lost, the changes are sent again as on the first start. Not used when 
`offsetStorage` is the Kafka store.
         type: string
         default: debezium-postgresql-offsets.dat
         example: /data/offsets.dat
diff --git 
a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json 
b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
index a737e11db..d2d22c5a0 100644
--- a/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
+++ b/library/camel-kamelets/src/main/resources/META-INF/kamelets-index.json
@@ -665,7 +665,7 @@
     "supportLevel" : "Preview",
     "title" : "Debezium PostgreSQL Source",
     "summary" : "Sends a message for each row inserted, updated or deleted in 
the tables of a PostgreSQL database, as it happens (change data capture with 
Debezium).",
-    "description" : "Sends a message for each row inserted, updated or deleted 
in the tables of a PostgreSQL database, as it happens (change data capture with 
Debezium).\n\nUse it to pass the changes of a database on to another system as 
they happen, for example to keep a search index or a cache up to date, or to 
copy new orders to a queue, without polling the tables. To read rows with a 
query again and again, use `postgresql-source`.\n\nOutput: the body is JSON 
text in bytes, an object  [...]
+    "description" : "Sends a message for each row inserted, updated or deleted 
in the tables of a PostgreSQL database, as it happens (change data capture with 
Debezium).\n\nUse it to pass the changes of a database on to another system as 
they happen, for example to keep a search index or a cache up to date, or to 
copy new orders to a queue, without polling the tables. To read rows with a 
query again and again, use `postgresql-source`.\n\nOutput: the body is JSON 
text in bytes, an object  [...]
     "group" : "Debezium",
     "namespace" : "Database",
     "provider" : "Apache Software Foundation"
diff --git 
a/library/camel-kamelets/src/main/resources/kamelets/debezium-postgresql-source.kamelet.yaml
 
b/library/camel-kamelets/src/main/resources/kamelets/debezium-postgresql-source.kamelet.yaml
index b38a8d578..2f7425610 100644
--- 
a/library/camel-kamelets/src/main/resources/kamelets/debezium-postgresql-source.kamelet.yaml
+++ 
b/library/camel-kamelets/src/main/resources/kamelets/debezium-postgresql-source.kamelet.yaml
@@ -36,9 +36,9 @@ spec:
 
       Use it to pass the changes of a database on to another system as they 
happen, for example to keep a search index or a cache up to date, or to copy 
new orders to a queue, without polling the tables. To read rows with a query 
again and again, use `postgresql-source`.
 
-      Output: the body is JSON text in bytes, an object with the column names 
as keys, such as `{"id":1,"name":"Tea","price":4.50}`: the row after the 
change, and for a delete the row before it. The columns can come in any order. 
A `NUMERIC` column is a JSON number with its decimals, such as `4.50`, and a 
`DATE` column the number of days since 1970-01-01, such as `20454` for 
2026-01-01. The `debezium-operation` header says what happened: `c` (insert), 
`u` (update), `d` (delete) or `r` (a [...]
+      Output: the body is JSON text in bytes, an object with the column names 
as keys, such as `{"id":1,"name":"Tea","price":4.50}`: the row after the 
change, and for a delete the row before it. The columns are in the order of the 
table. A `NUMERIC` column is a JSON number with its decimals, such as `4.50`, 
and a `DATE` column the number of days since 1970-01-01, such as `20454` for 
2026-01-01. The `debezium-operation` header says what happened: `c` (insert), 
`u` (update), `d` (delete) o [...]
 
-      Good to know: the server must run with `wal_level=logical`, and the user 
needs the `REPLICATION` attribute and the right to read the tables. On the 
first start, the Kamelet creates a replication slot named `slotName` and a 
publication named `publicationName` in the database, and by default sends every 
row of the tables first (`snapshotMode`). It saves how far it got in the file 
`offsetStorageFileName`, or in a Kafka topic, when it stops and once a minute 
while it runs, and after a  [...]
+      Good to know: the server must run with `wal_level=logical`, and the user 
needs the `REPLICATION` attribute and the right to read the tables. On the 
first start, the Kamelet creates a replication slot named `slotName` and a 
publication named `publicationName` in the database, and by default sends every 
row of the tables first (`snapshotMode`). It saves how far it got in the file 
`offsetStorageFileName`, or in a Kafka topic, when it stops and once a minute 
while it runs, and after a  [...]
     required:
       - serverName
       - username
@@ -118,7 +118,7 @@ spec:
         default: pgoutput
       offsetStorageFileName:
         title: Position File
-        description: The file where the Kamelet saves how far it got, such as 
`/data/offsets.dat`, read again after a restart. It is created when it does not 
exist, but its folder must exist, or nothing is saved. A relative name is in 
the folder the integration runs in. When it is lost, the changes are sent again 
as on the first start. Not used when `offsetStorage` is the Kafka store.
+        description: The file where the Kamelet saves how far it got, such as 
`/data/offsets.dat`, read again after a restart. It is created when it does not 
exist, but its folder must exist and be writable, or the Kamelet fails to 
start. A relative name is in the folder the integration runs in. When it is 
lost, the changes are sent again as on the first start. Not used when 
`offsetStorage` is the Kafka store.
         type: string
         default: debezium-postgresql-offsets.dat
         example: /data/offsets.dat
diff --git 
a/tests/camel-kamelets-itest/src/test/resources/database/debezium/debezium-postgresql-source-route.citrus.it.yaml
 
b/tests/camel-kamelets-itest/src/test/resources/database/debezium/debezium-postgresql-source-route.citrus.it.yaml
index a36df7e77..943af1ef6 100644
--- 
a/tests/camel-kamelets-itest/src/test/resources/database/debezium/debezium-postgresql-source-route.citrus.it.yaml
+++ 
b/tests/camel-kamelets-itest/src/test/resources/database/debezium/debezium-postgresql-source-route.citrus.it.yaml
@@ -72,12 +72,14 @@ actions:
                 - name: "camel.component.debezium-postgres.columnExcludeList"
                   value: "public.products.note"
 
-  # The snapshot: the row as it is, as JSON text in bytes; the note column is 
left out by columnExcludeList
+  # The snapshot: the row as it is, as JSON text in bytes, with the columns in 
the order of the table; the note column
+  # is left out by columnExcludeList
   - http:
       server: "httpServer"
       receiveRequest:
         POST:
           path: "/result"
+          type: "plaintext"
           headers:
             - name: "X-Run"
               value: 'first'

Reply via email to