tuteng commented on issue #5590: [Issue 5474][pulsar-io-debezium] Support CDC 
Connector for MongoDB
URL: https://github.com/apache/pulsar/pull/5590#issuecomment-552762810
 
 
   > @tuteng I hava added it,and I Moved the methed validateSourceResult to 
there superClass SourceTester。
   
   I think MySQL and postgresql can use the same function validateSourceResult, 
but mongo may need to use its own validateSourceResult, and the value field is 
different from the other two DB, for example, the following:
   
   ```
   INFO  org.apache.pulsar.tests.integration.io.DebeziumMongoDbSourceTester - 
Received message: key = 
{"schema":{"type":"struct","fields":[{"type":"string","optional":false,"field":"id"}],"optional":false,"name":"dbserver1.inventory.products.Key"},"payload":{"id":"104"}},
 value = 
{"schema":{"type":"struct","fields":[{"type":"string","optional":true,"name":"io.debezium.data.Json","version":1,"field":"after"},{"type":"string","optional":true,"name":"io.debezium.data.Json","version":1,"field":"patch"},{"type":"struct","fields":[{"type":"string","optional":false,"field":"version"},{"type":"string","optional":false,"field":"connector"},{"type":"string","optional":false,"field":"name"},{"type":"int64","optional":false,"field":"ts_ms"},{"type":"string","optional":true,"name":"io.debezium.data.Enum","version":1,"parameters":{"allowed":"true,last,false"},"default":"false","field":"snapshot"},{"type":"string","optional":false,"field":"db"},{"type":"string","optional":false,"field":"rs"},{"type":"string","optional":false,"field":"collection"},{"type":"int32","optional":false,"field":"ord"},{"type":"int64","optional":true,"field":"h"}],"optional":false,"name":"io.debezium.connector.mongo.Source","field":"source"},{"type":"string","optional":true,"field":"op"},{"type":"int64","optional":true,"field":"ts_ms"}],"optional":false,"name":"dbserver1.inventory.products.Envelope"},"payload":{"after":"{\"_id\":
 {\"$numberLong\": \"104\"},\"name\": \"hammer\",\"description\": \"12oz 
carpenter's hammer\",\"weight\": 0.75,\"quantity\": 
4}","patch":null,"source":{"version":"0.10.0.Final","connector":"mongodb","name":"dbserver1","ts_ms":1573541905000,"snapshot":"true","db":"inventory","rs":"rs0","collection":"products","ord":1,"h":4983083486544392763},"op":"r","ts_ms":1573541909761}}.
   ```
   Value is `dbserver1.inventory.products.Envelope`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to