Hello everyone ! I am also facing the same issue i am using aws msk conenctor to create a source for mongodb atlas(Free version), and i have set 0.0.0.0/0 on network access on mongodb atlas, When i am creating msk connector or AWS Flink application to capture or send data to mongo i am getting timeout error, My vpc and sg allows all the access from internet, here are the configuration i have used for creating the connector.
connector.class=io.debezium.connector.mongodb.MongoDbConnector
collection.include.list=mongo-***
mongodb.password=pass
tasks.max=1
database.history.kafka.bootstrap.servers=
database.history.kafka.topic=dbhistory.fullfillment
mongodb.user=username
connection.attempts=1
mongodb.name=mongo-source
value.converter.schemas.enable=false
value.converter=org.apache.kafka.connect.json.JsonConverter
mongodb.hosts=mongodb+srv://:@host.net/?retryWrites=true&w=majority&appName=myapp
database.include.list=mongo-db
I also have a qus while trying to make connection for aws managed service like (flink and msk connector) do we need private endpoint or vpc peering for mongo or we can make connection just by allowing the access in vpc and sg attached to the services(AWS Flink and MSK connector)?