Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kafka Connect with Amazon MSK

How do I use Kafka Connect adapters with Amazon MSK? As per the AWS documentation, it supports Kafka connect but not documented about how to setup adapters and use it.

like image 498
Mrigank Kishore Varma Avatar asked Dec 05 '19 12:12

Mrigank Kishore Varma


People also ask

What is MSK connect in Kafka?

This feature makes it easy for you to deploy connectors that move data between Apache Kafka clusters and external systems such as databases, file systems, and search indices. MSK Connect is fully compatible with Kafka Connect, so you can run your applications with no changes.

What is Amazon MSK for Apache Kafka?

Amazon MSK lets you focus on creating your streaming applications without having to worry about the operational overhead of managing your Apache Kafka environment. Amazon MSK manages the provisioning, configuration, and maintenance of Apache Kafka clusters and Apache ZooKeeper nodes for you.

How do I connect to my Amazon MSK cluster using the Kafka-kinesis-connector?

How do I connect to my Amazon MSK cluster using the Kafka-Kinesis-Connector? To connect to your MSK cluster using the Kafka-Kinesis-Connector, your setup must meet the following requirements: An active AWS subscription. A virtual private cloud (VPC) that is visible to both the client machine and MSK cluster.

What is Amazon MSK?

Amazon MSK makes it easy to ingest and process streaming data in real time with fully managed Apache Kafka. Capture events with MSK, and then express your stream processing logic within Apache Zeppelin notebooks to derive insights from data streams in milliseconds.


3 Answers

AWS now supports MSK Connect, a new feature of MSK service based on Kafka Connect allowing you to deploy managed Kafka connectors built for Kafka connect

Check the announcement here: https://aws.amazon.com/blogs/aws/introducing-amazon-msk-connect-stream-data-to-and-from-your-apache-kafka-clusters-using-managed-connectors/

like image 145
Shainberg Avatar answered Oct 29 '22 22:10

Shainberg


Edit Oct 2021: MSK Connect has been launched, see https://aws.amazon.com/blogs/aws/introducing-amazon-msk-connect-stream-data-to-and-from-your-apache-kafka-clusters-using-managed-connectors/


AFAIK Amazon MSK does not provide managed connectors, so you have to run them yourself. This is done by running the Kafka Connect worker process (a JVM) and then providing it one or more connector configurations to run.

From the point of view of a Kafka Connect worker it just needs a Kafka cluster to connect to; it shouldn't matter whether it's MSK or on-premises, since it's ultimately 'just' a consumer/producer underneath.

You can see more, including a live demo, here: https://rmoff.dev/bbuzz19-kafka-connect

For an example of configuring Kafka Connect to use a cloud-hosted Kafka platform (in this case, Confluent Cloud), see this article.


If you are interested in managed connectors in the Cloud, check out the connectors that are provided in Confluent Cloud.

Disclaimer: I work for Confluent :)

like image 28
Robin Moffatt Avatar answered Oct 29 '22 23:10

Robin Moffatt


There are two aspects to this

  1. Kafka Connect is a framework which should be deployed separately from kafka brokers. MSK only provides kafka brokers. If you want to use Kafka Connect with MSK you would need to use EC2 instances and deploy the kafka binaries.Kafka Connect framework is bundled along with kafka

  2. Coming to connectors if you donot have a confluent subscription or similar - I am afraid your choices get very limited. But having said you can always write your own connectors. Writing new connectors is not that difficult rather you can apply your business specific logic and be on your way quite quickly.

like image 24
floating_hammer Avatar answered Oct 29 '22 22:10

floating_hammer