Debezium Outbox Pattern property transforms.outbox.table.expand.json.payload remove empty arrays

62 views
Skip to first unread message

Oleksandr Klosovych

unread,
Mar 20, 2023, 10:03:08 AM3/20/23
to debezium
0

I'm implementing an outbox pattern using the debezium postgres connector, building up upon the official documentation: https://debezium.io/documentation/reference/stable/transformations/outbox-event-router.html.

Everything ok but now I see a strange behavior that empty arrays are missing in Kafka messages if transforms.outbox.table.expand.json.payload  tern to true

if in table I have value "{"some":"test", "agreemets":[]}" in topic message looks {"some":"test"}.

How I can fix this to see an empty array in Kafka messages?

My configuration 

{
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"tasks.max": "1",
"database.hostname": "db",
"database.port": "5432",
"database.user": "postgres",
"database.password": "postgres",
"database.dbname": "dev",
"schema.include.list": "common",
"table.include.list": "common.outboxmessages",
"tombstones.on.delete": "false",
"transforms": "outbox",
"transforms.outbox.type": "io.debezium.transforms.outbox.EventRouter",
"transforms.outbox.route.by.field": "topic",
"transforms.outbox.route.topic.replacement": "${routedByValue}",
"transforms.outbox.table.field.event.timestamp": "created_at",
"transforms.outbox.table.expand.json.payload": "true",
"plugin.name": "pgoutput"
}

Chris Cranford

unread,
Mar 21, 2023, 8:30:34 AM3/21/23
to debe...@googlegroups.com
Hi -

There were a few JSON payload expansion issues, this one in particular sounds similar to DBZ-5796, DBZ5344, and DBZ-4704.  Could you please try with the latest version (2.1.3.Final) and if this continues to be problematic, could you please raise a Jira with the details of your use case and we'll look into it?

Thanks,
Chris
--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/9bbb50c3-d0fa-4e6e-b514-f53da05b7f55n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages