Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
-
1.9.3.Final
-
None
-
False
-
None
-
False
-
1.9.3.Final
Description
In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.
Bug report
For bug reports, provide this information, please:
What Debezium connector do you use and what version?
1.9.2
What is the connector configuration?
{
"name": "outbox-config",
"config": {
"connector.class": "io.debezium.connector.mongodb.MongoDbConnector",
"mongodb.hosts": "xxx",
"mongodb.name": "df-stage",
"mongodb.user": "xxx-stage",
"mongodb.password": "xxx",
"mongodb.ssl.enabled": true,
"tombstones.on.delete": false,
"transforms": "outbox",
"transforms.outbox.type": "io.debezium.connector.mongodb.transforms.outbox.MongoEventRouter",
"transforms.outbox.collection.field.event.key": "aggregateId",
"transforms.outbox.collection.field.event.type": "eventType",
"transforms.outbox.collection.fields.additional.placement": "eventType:header",
"transforms.outbox.collection.expand.json.payload": true,
"transforms.outbox.route.topic.replacement": "user-service.outbox.event.${routedByValue}",
"transforms.outbox.route.by.field": "aggregateType",
"collection.include.list": ".*outbox",
"include.schema.changes": true,
"database.include.list": "userDB",
"key.converter.schemas.enable": false,
"value.converter.schemas.enable": true,
"value.converter": "org.apache.kafka.connect.converters.ByteArrayConverter",
"value.converter.delegate.converter.type": "org.apache.kafka.connect.json.JsonConverter",
"value.converter.delegate.converter.type.schemas.enable": false
}
}
What is the captured database version and mode of depoyment?
(E.g. on-premises, with a specific cloud provider, etc.)
Mongodb 5.0
What behaviour do you expect?
Mongodb stores byte array as a base64 encoding. When pushing the payload to kafka, the value should be decoded and the original payload should be pushed to kafka
What behaviour do you see?
The io.debezium.converters.ByteArrayConverter makes the byte array for the base64 encoded string
Do you see the same behaviour using the latest relesead Debezium version?
(Ideally, also verify with latest Alpha/Beta/CR version)
yes
Do you have the connector logs, ideally from start till finish?
(You might be asked later to provide DEBUG/TRACE level log)
yes
How to reproduce the issue using our tutorial deployment?
- Use https://github.com/debezium/debezium-examples/blob/main/tutorial/docker-compose-mongodb.yaml.
- Insert an avro-encoded class to mongodb payload as a byte[].
- Consume the kafka message.
- Try to decode the payload.
Feature request or enhancement
For feature requests or enhancements, provide this information, please:
Which use case/requirement will be addressed by the proposed feature?
Mongodb outbox event router will work as expected.
Implementation ideas (optional)
useĀ
org.apache.kafka.connect.converters.ByteArrayConverter instead