-
Notifications
You must be signed in to change notification settings - Fork 590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cdc): Add MongoDB CDC Source #14966
Changes from 19 commits
7399c7c
6a5bbb9
fd4aa01
3798597
d62252c
b4709b6
cc777ae
e4782a5
8e73db3
d170224
8433b84
6fab333
17af015
1fc3a52
ef7ca65
bcabf96
45398f9
5c7420f
5987352
a3f3f54
f53cf2a
3955ee2
71f6f9d
6ec7be3
89f1911
5388f6c
7ed6661
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,12 +47,14 @@ public static CdcEngineRunner newCdcEngineRunner( | |
config.getResolvedDebeziumProps(), | ||
(success, message, error) -> { | ||
if (!success) { | ||
responseObserver.onError(error); | ||
LOG.error( | ||
"engine#{} terminated with error. message: {}", | ||
sourceId, | ||
message, | ||
error); | ||
if (error != null) { | ||
responseObserver.onError(error); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any motivation for this change? In what situation will it failed with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For defensive of nullptr and match the implementation of the following |
||
} else { | ||
LOG.info("engine#{} stopped normally. {}", sourceId, message); | ||
responseObserver.onCompleted(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# configs for postgres conneoctor | ||
connector.class=io.debezium.connector.mongodb.MongoDbConnector | ||
# default snapshot mode to initial | ||
snapshot.mode=${debezium.snapshot.mode:-initial} | ||
mongodb.connection.string=${mongodb.url} | ||
collection.include.list=${collection.name} | ||
# default heartbeat interval 5 mins | ||
heartbeat.interval.ms=${debezium.heartbeat.interval.ms:-300000} | ||
neverchanje marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# In sharing cdc source mode, we will subscribe to multiple tables in the given database, | ||
# so here we set ${table.name} to a default value `RW_CDC_Sharing` just for display. | ||
# TODO: set this field in the code | ||
name=${collection.name:-RW_CDC_Sharing} | ||
provide.transaction.metadata=${transactional:-false} | ||
# update event messages include the full document | ||
capture.mode=${debezium.capture.mode:-change_streams_update_full} | ||
# disable tombstones event | ||
tombstones.on.delete=${debezium.tombstones.on.delete:-false} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also add some auth related options and try to test with a vendor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
username and password can be provided via the connection string (
mongodb.url
) if needed.