Connect to MongoDB atlas within AWS VPC using AWS MSK connector

Viewed 401

I am trying to use MongoDB change stream using Kafka. I chose AWS MSK since my entire infrastructure is within AWS and it will be easy to integrate with other AWS services.

I created an AWS MSK cluster within the VPC and created an AWS MSK connect using mongodb Kafka connector. I am getting the following error (Exception opening socket, connect timed out) enter image description here

To test whether it has to do with VPC, I gave the public access to MongoDB by whitelisting 0.0.0.0, and then the connector is working fine. So I believe it has something to do with the VPC.

I tried multiple times with AWS MSK with VPC with public subnets, NAT gateway, etc, and it is still not working. Am getting the same error. I believe the AWS MSK connecter uses the same VPC configuration as AWS MSK since there's no separate configuration for AWS MSK Connect.

1 Answers
Related