Amazon Managed Streaming For Apache Kafka
Amazon Managed Streaming For Apache Kafka
Amazon MSK is a fully managed service that provide to build and run applications that use
Apache Kafka to process streaming data.
Apache Kafka is an open-source platform for building real-time streaming data pipelines and
applications.
Amazon MSK provide to use native Apache Kafka APIs to populate data lakes, stream
changes to and from databases, and power machine learning and analytics applications
Amazon MSK eliminates all these challenges and makes it easy to build and run production
applications on Apache Kafka without needing Apache Kafka infrastructure management
expertise. That means spend less time managing infrastructure and more time building
applications.
Amazon MSK automatically provisions and runs your Apache Kafka clusters.
Amazon MSK continuously monitors cluster health and automatically replaces unhealthy
nodes with no downtime to your application.
producer: Any devices such as Web server, IoT devces,Ec2 instances etc
Consumer: Application reading data from Kafka
Kafka: Cluster framework in which Kafka is running
Broker: It is storage node that produces right data to be consumed by consumers
Zookeeper: Maintain state of resources involved in kafka cluster
Hands-on:
Step 1: Create a VPC for MSK Cluster:
1. Go to bin directory of Apache Kafka installation and run the following command
cp /usr/lib/jvm/JDKFolder/jre/lib/security/cacerts /tmp/kafka.client.truststore.jks
2. Create file client.properties in the bin folder of the Apache Kafka installation on the client
machine with the following contents.
security.protocol=SSL
ssl.truststore.location=/tmp/kafka.client.truststore.jks
3. Run the following command in the bin folder, replacing BootstrapBrokerStringTls with the
Bootstrap servers url.
./kafka-console-producer.sh --broker-list BootstrapBrokerStringTls --producer.config
client.properties --topic AWSKafkaTutorialTopic
4. Keep the connection to the client machine open, and then open a second, separate
connection to that machine in a new window
Run the following command with replacing BootstrapBrokerStringTls url
Producer:
Consumer: