-
Bug
-
Resolution: Done
-
Minor
-
None
-
None
-
False
-
None
-
False
Bug report
EventRouter SMT, when used together with fields.additional.placement setting, cannot handle presence of whitespaces in the value of fields.additional.placement setting.
I personally do understand that this setting expects a "comma-separated list of pairs" (as is stated in the documentation).
But here are several reasons to add handling of whitespaces in mentioned setting:
- Confluent Control Center UI allows to download connector configuration (in .json or .properties file format). In both cases in forcefully inserts whitespaces between items of this list. Many people use Control Center UI to download configuration for some connector, make changes inside of its config file, and create new connector by uploading newly received file through the same Control Center UI
Please see the screenshot attached - Debezium connectors handle fine the presence of whitespaces inside of other settings that expect lists of values (like, table.include.list, schema.include.list and so on)
- It will make Debezium connector more robust in general
What Debezium connector do you use and what version?
PostgreSQL 2.2.1, 2.4.0, 2.5.0.Alpha2
What is the connector configuration?
{...
"transforms": "outbox",
"transforms.outbox.type": "io.debezium.transforms.outbox.EventRouter",
"transforms.outbox.table.field.event.key": "id",
"transforms.outbox.table.field.event.payload": "payload",
"transforms.outbox.table.expand.json.payload": "true",
"transforms.outbox.route.by.field": "name",
"transforms.outbox.route.topic.replacement": "myprefix.${routedByValue}",
"transforms.outbox.table.fields.additional.placement": "field1:envelope, field2:envelope",
...}
What is the captured database version and mode of depoyment?
Postgres12, on-premises
All columns that are mentioned in "table.fields.additional.placement" setting do exist in the source table.
What behaviour do you expect?
Connector starts fine and sends CDC events into Kafka. Every event sent by the connector contains fields mentioned in "table.fields.additional.placement" setting
What behaviour do you see?
Connector throws NullPointerException. Please see the screenshot attached.
To make things worse connector does not provide any meaningful error message (like in our case it could be, for example, "Field ' field2' is not found in the source table")
Do you see the same behaviour using the latest relesead Debezium version?
Yes, verified with version 2.5.0.Alpha2
Do you have the connector logs, ideally from start till finish?
Please screenshot of the error attached
How to reproduce the issue using our tutorial deployment?
Start PostgreSQL database, create Debezium PostgreSQL Source connector for it using the configuration mentioned in corresponding section above
- links to
-
RHEA-2024:129636 Red Hat build of Debezium 2.5.4 release