Skip to content

Commit

Permalink
source-mongodb: add support for AWS DocumentDB
Browse files Browse the repository at this point in the history
AWS DocumentDB is mostly MongoDB wire protocol compatible, and supports many of
the features that MongoDB does.

It's support for change streams is pretty limited though, since they don't
include a post-batch resume token, which makes them basically unusable for our
current connector.

But we can support DocumentDB with batch-mode bindings, and using a somewhat
hacky way of detecting that we are connecting to DocumentDB using a regex on the
configured address that allows the necessary TLS configuration to be set.
  • Loading branch information
williamhbaker committed Sep 20, 2024
1 parent 68f23ee commit d8d4c8d
Show file tree
Hide file tree
Showing 5 changed files with 2,603 additions and 5 deletions.
3 changes: 2 additions & 1 deletion source-mongodb/VARIANTS
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
source-cosmosdb-mongodb
source-cosmosdb-mongodb
source-amazon-documentdb
2 changes: 1 addition & 1 deletion source-mongodb/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (d *driver) Discover(ctx context.Context, req *pc.Request_Discover) (*pc.Re
return &pc.Response_Discovered{Bindings: bindings}, nil
}

serverInfo, err := getServerInfo(ctx, client, databaseNames[0])
serverInfo, err := getServerInfo(ctx, cfg, client, databaseNames[0])
if err != nil {
return nil, fmt.Errorf("getting server info: %w", err)
}
Expand Down
Loading

0 comments on commit d8d4c8d

Please sign in to comment.