Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-7368

Document relation between column type and serializers for outbox

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major Major
    • 2.6.0.Beta1
    • None
    • documentation
    • None
    • False
    • None
    • False

      What Debezium connector do you use and what version?

      debezium-connector-postgres 2.4.2.Final

      What is the connector configuration?

      {
        "connector.class": "io.debezium.connector.postgresql.PostgresConnector",
        "database.dbname": "dbname",
        "database.hostname": "host.k3d.internal",
        "database.password": "password",
        "database.port": "5432",
        "database.server.name": "outbox_events",
        "database.sslmode": "disable",
        "database.user": "user",
        "heartbeat.interval.ms": "1000",
      
        "name": "debezium-outbox-router",
        "plugin.name": "pgoutput",
        "publication.autocreate.mode": "disabled",
        "publication.name": "debezium_outbox",
        "slot.name": "debezium_outbox",
        "table.include.list": "public.outbox_events",
        "tasks.max": "1",
        "topic.prefix": "events",
        
        "transforms": "outbox",
        "transforms.outbox.route.by.field": "aggregate_type",
        "transforms.outbox.table.field.event.key": "aggregate_id",
        "transforms.outbox.type": "io.debezium.transforms.outbox.EventRouter",
      
        "key.converter.delegate.converter.type": "io.confluent.connect.avro.AvroConverter",
        "key.converter.delegate.converter.type.basic.auth.credentials.source": "USER_INFO",
        "key.converter.delegate.converter.type.basic.auth.user.info": "user-info",
        "key.converter.delegate.converter.type.enhanced.avro.schema.support": "true",
        "key.converter.delegate.converter.type.schema.registry.url": "url",
      
        "value.converter": "io.debezium.converters.BinaryDataConverter",
        "value.converter.delegate.converter.type": "io.confluent.connect.avro.AvroConverter",
        "value.converter.delegate.converter.type.basic.auth.credentials.source": "USER_INFO",
        "value.converter.delegate.converter.type.basic.auth.user.info": "user-info",
        "value.converter.delegate.converter.type.enhanced.avro.schema.support": "true",
        "value.converter.delegate.converter.type.schema.registry.url": "url"
      }
      

      What is the captured database version and mode of depoyment?

      GCP PostgreSQL 13

      What behaviour do you expect?

      The value of the message is copied as binary per the configuration ("value.converter": "io.debezium.converters.BinaryDataConverter",). Not transformation of any kind is applied. As the value written to the DB column is a string, the payload of the message written to Kafka should be that string.

      Heartbeats messages are written as Avro per the delegate converter configuration.

      What behaviour do you see?

      Heartbeats messages are written as Avro per the delegate converter configuration.

      However, values are converted to Avro, and a schema is registered for the value. When using kcat to ouput messages, a normal message would be a string (starts with `"{\"id\":`), however the messages are written as Avro (starts with `???M{"id":`). A schema was registered in Schema Registry for that topic.

      Do you see the same behaviour using the latest relesead Debezium version?

      I was not able to validate, but I don't see any change that would change the behaviour.

      Do you have the connector logs, ideally from start till finish?

      I can't provide all logs due to security concerns. I can provide specifics if needed.

            rh-ee-mvitale Mario Fiore Vitale
            enzo.cappa Enzo Cappa
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: