Create a Kafka Cluster Using AWS MSK And Stream Data - Full Coding Demo

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024

ความคิดเห็น • 104

  • @theamithsingh
    @theamithsingh ปีที่แล้ว +1

    great tutorial mate, would love to see more 'hands-on' tutorials like this on youtube.

  • @Quivun
    @Quivun 3 ปีที่แล้ว +1

    Thanks! These demos help learning immensely!

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      Thanks for watching and the comment Quivun.

  • @li14lax
    @li14lax 2 ปีที่แล้ว +3

    I keep getting timeout errors:" WARN Client session timed out, have not heard from server in 10027ms for sessionid 0x0 (org.apache.zookeeper.ClientCnxn)" when I try to create the topic. Is there a certain permission I need to grant on either the MSK service or the EC2 instance I'm currently running? Both are in the same VPC. TIA!

  • @杨正云
    @杨正云 4 ปีที่แล้ว +1

    Nice post, very straight foward!

  • @matheusmandotti6121
    @matheusmandotti6121 3 ปีที่แล้ว +1

    Just incredible, congratulations !! Great video

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว +1

      Thanks for watching Matheus.

  • @Chavoosi
    @Chavoosi 4 ปีที่แล้ว +2

    Great tutorial mate. Thanks for your efforts

  • @ajaykumarveldhi6385
    @ajaykumarveldhi6385 3 ปีที่แล้ว +1

    Thank you for the Demo ...

  • @SacrificialGoat94
    @SacrificialGoat94 3 ปีที่แล้ว +1

    Instead of opening kafka up to everything or using the public ip you can just specify the security group of the ec2 instance ?

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      Yes, and absolutely advisable.
      I tend to make everything as open as possible on these demos, just so there are less chances of something going wrong for those following along.
      However, in the real world. Lock it down with security groups and Nacls.

  • @arrjay3814
    @arrjay3814 2 ปีที่แล้ว

    Looks like the path in the wget command to download Kafka is now invalid. Can you share the latest command to download Kafka? Thanks for supporting the community Johnny!

  • @nishokganesan6804
    @nishokganesan6804 3 ปีที่แล้ว

    Can we connect this EC-2 instance from out local and send messages to topic?

  • @jimbrannlund4677
    @jimbrannlund4677 3 ปีที่แล้ว +2

    Upvoted partly for the accent. :)

  • @nainaarabha9186
    @nainaarabha9186 ปีที่แล้ว

    I have one doubt. Can we host multiple kafka producers in one ec2 instance?

  • @nikhilmittal2469
    @nikhilmittal2469 ปีที่แล้ว +1

    Hi guys, getting below error when trying to write message on the kafka topic. Any help would be appreciated.
    ERROR Error when sending message to topic AWSKafkaTutorialTopic with key: null, value: 14 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
    org.apache.kafka.common.errors.TimeoutException: Topic AWSKafkaTutorialTopic not present in metadata after 60000 ms.
    [Resolved] Its working for me now, had to change few security settings,
    "access control method"= unauthenticated access
    Encryption= TLS encryption

  • @melsaied101
    @melsaied101 3 ปีที่แล้ว +1

    That was AWESOME

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      Thanks for watching Mohamed.

  • @samjoshuaberchmans3901
    @samjoshuaberchmans3901 3 ปีที่แล้ว +1

    Do you have any tutorials for Kafka/Spark streaming data ? Would like to view them.
    EMR will be having Spark , and we should be running spark from there. Consumer/Producer will be available in EC2.
    Would like to start a HBASE EMR to insert the values final into the HBASE tables.
    If you have any sample Videos for the same post it.

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      I don't at the moment unfortunately. It is on my future lesson plans list for a series on EMR using both Spark and Flink streaming, but they won't be completed for another couple of months as it stands. Presently, there is a lot of Kinesis on the channel - but in future I will be addressing this imbalance with other streaming technologies.

  • @mqguitar06
    @mqguitar06 4 ปีที่แล้ว +1

    Fantastic video, Thank you so much!

  • @PoojaGupta-bi1kw
    @PoojaGupta-bi1kw ปีที่แล้ว

    how can i connect it with springboot producer app?

  • @maksymkoval1754
    @maksymkoval1754 4 ปีที่แล้ว +1

    Thank you! It was a very helpful)

  • @ravindharanshanmugam8853
    @ravindharanshanmugam8853 4 ปีที่แล้ว +1

    Thanks for the nice demo. one question from my end, how to stream data from filebeat to AWS MSK then to logstash?
    FileBeat => AWS MSK => Logstash
    (both file beat & logstash is in same vpc as of AWS MSK)
    I tried to connect as usual but hard luck. do we need to do any special config change?

    • @JohnnyChivers
      @JohnnyChivers  4 ปีที่แล้ว +1

      I am not overly familiar with FileBeat, but there is a config file which let's you specify Kafka brokers and suspect this needs updated to reflect the MSK information. Being inside the same VPC should make this easier. www.elastic.co/guide/en/beats/filebeat/master/kafka-output.html

    • @ravindharanshanmugam8853
      @ravindharanshanmugam8853 4 ปีที่แล้ว +1

      Johnny Chivers thank you. Will try it out.

  • @johnsaviello6240
    @johnsaviello6240 3 ปีที่แล้ว +1

    I am getting the following error when I go to create the topic " Exception in thread "main" kafka.zookeeper.ZooKeeperClientTimeoutException: Timed out waiting for connection while in state: CONNECTING". Any way to resolve this?

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      Hi John,
      It could be a couple of things. Firstly double check that the zoo keeper connection string is correct. It will time out if it can't reach zoo keeper.
      If the connection string is correct then it's probably a security group or ACL issue preventing the connection. In the demo i open up the security group to all traffic. This is a bit excessive but my aim is to make there less issues when following along. So, ensure you can reach zoo keeper and you're not being blocked by in bound rules in a security group.
      After that, you may have an ACL issue depending on how your aws account is configured. There is a great article on stacked overflow about it here. stackoverflow.com/questions/58173102/aws-msk-timeout-when-creating-kafka-topic-with-acl-turned-on
      Hope this helps.
      Johnny

    • @johnsaviello6240
      @johnsaviello6240 3 ปีที่แล้ว +1

      @@JohnnyChivers hey Johnny. Turns out you were right about the security group - I was trying to adjust the main SG I was using to accommodate my local machine IP. Then I added in an inbound rule for said SG and it worked. Thanks!

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      No problem. Good news that it is working. Thanks for watching.

  • @danteiva8482
    @danteiva8482 3 ปีที่แล้ว

    Thanks! All working properly!

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      @dante thanks for watching and following along.

  • @nozzom82
    @nozzom82 3 ปีที่แล้ว +1

    Hi Johnny, I am not getting the kafka bootstrap brookers - aws kafka get-bootstrap-brokers --region ap-southeast-2 --cluster-arn "arn:aws:kafka:ap-southeast-2:xyxdfasdfasf". For some reason I do not get any response. When I run the describe kafka command I do get the full response with Zookeeper id and cluster details.

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว +1

      Hi Nozzom, Thanks for watching. What version of the CLI are you using? There was an issue with this exact thing on 1.16 and going to 1.17.9 or higher seems to solve it.

    • @nozzom82
      @nozzom82 3 ปีที่แล้ว

      @@JohnnyChivers I have not checked the version. Thank you for the suggestion.

  • @adrianomorsa8547
    @adrianomorsa8547 2 ปีที่แล้ว

    Amazing tutorial

  • @yovelb131
    @yovelb131 3 ปีที่แล้ว +1

    hey man great video!
    im trying to run the "aws kafa describe-cluster ....." command but im getting the following error:
    An error occurred (NotFoundException) when calling the DescribeCluster operation: The requested resource doesn’t exist.
    any chance for help?

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      Hi Yovel, thanks for watching. At what point are you running into the issue? Is it after the cluster has become available on the console?

    • @yovelb131
      @yovelb131 3 ปีที่แล้ว

      ​@@JohnnyChivers hey man thanks for the response, well i got that error when i tried to use the aws kafka command to get the MSK ARN in the terminal after the cluster became available. i managed to just use the information displayed in the aws console to complete the video though

  • @AkashGupta-sy4pi
    @AkashGupta-sy4pi 3 ปีที่แล้ว +1

    Hi, I am getting following issue
    Messages are rejected since there are fewer in-sync replicas than required"
    Can u please inform me what might be the case

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว +1

      Sounds like your minimum sync replicas have gone below the limit for the topic.
      It could be a configuration issue, but if your working to the exact settings I have? Then the cluster maybe unhealthy due to disc space running out. There is some debugging information about disc space and sync issues here docs.aws.amazon.com/msk/latest/developerguide/troubleshooting.html#troubleshooting-offlinepartitions-outofsyncreplicas

    • @AkashGupta-sy4pi
      @AkashGupta-sy4pi 3 ปีที่แล้ว

      @@JohnnyChivers All brokers have enough disc space, still it is throwing same error

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      It may be one of those annoying cases where deleting the MSK cluster and rebuilding from scratch could be the best solution.
      I've had a couple of issues with EMR today where deprovisioning and reprovisioning solved the issue.

  • @Explore_with_Azizul-maqsud
    @Explore_with_Azizul-maqsud ปีที่แล้ว

    Awesome & Very nice content... but, unfortunately, the lowest sound ever in the youtube videos I experienced here..?? Please record with loud speaking. Thank YOU

  • @Hypnock1
    @Hypnock1 4 ปีที่แล้ว +1

    Hello i have a question. Can i do this on AWS Free Tier? I want to try this and AWS Glue ETL Streaming jobs but cant find any information about it. Nice video!

    • @JohnnyChivers
      @JohnnyChivers  4 ปีที่แล้ว +2

      The smallest MSK broker instance is a T3 small which isn’t in the free tier unfortunately. The pub/sub EC2 I spin up could be a micro instance in the free tier. It will just take slightly longer for the updates and installs than this demo. I had the larger instances in this demo spun up for 6 hours and it cost me 5 USD, so by using the free tier EC2 for pub/sub plus the smallest broker instance it shouldn’t be anymore that a few dollars.
      In terms of glue I have a getting started video on this channel th-cam.com/video/w54eIfIjJRw/w-d-xo.html

    • @Hypnock1
      @Hypnock1 4 ปีที่แล้ว +1

      ​@@JohnnyChivers Thank you very much! Im trying to do some jobs using MSK and Glue ETL Streaming jobs into S3 (Parquet format). This will come in handy!

  • @mharongundayao6242
    @mharongundayao6242 3 ปีที่แล้ว +1

    Amazing tutorial Thank you! Can I connect my spring boot app to amazon MSK cluster? using kafka connect?

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      Thank you Mharon. Yes, you can use kafka connect. Unfortunately, there is no MSK managed service for this. There is however a great stack overflow post on this exact topic and a link to a video that is really helpful on the best answer post.
      stackoverflow.com/questions/59194786/kafka-connect-with-amazon-msk

    • @mharongundayao6242
      @mharongundayao6242 3 ปีที่แล้ว

      @@JohnnyChivers Okay Thank you for this Do you suggest using Amazon MSK When you want your spring boot app to produce and as well as consume using the @KafkaListener annotation in the Spring boot app? from the amazon msk cluster?

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      It certainly can be done. It's really a personal thing. I've always found that third party offerings of kafka remove the headache of managing your own cluster. The great thing about MSK is the abstraction. However, the trade off is you don't have as much control compared to building your own cluster from scratch. But, building one from scratch and then maintaining it is not a simple task.

  • @prithviboinpally2138
    @prithviboinpally2138 3 ปีที่แล้ว +3

    Great tut. Audio is really quiet though

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      Thanks for watching Prithvi. First person to mention the audio. I usually edit using headphones so it wasnt noticeable to me, but I'll keep it in mine for future vids.

  • @rostislav_engineer
    @rostislav_engineer 9 หลายเดือนก่อน

    thanks for this video!

  • @zheng5152
    @zheng5152 3 ปีที่แล้ว +1

    I love your desktop background image,how to get it!

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      It's one of the desktops on Mac Dark Mode. If you Google "dark mode mac ocean" the background is available as a wallpaper on the 5/6th hit on image search. You can download it and use that as a desktop on Windows or Linux.

  • @diegobayona9785
    @diegobayona9785 3 ปีที่แล้ว

    Great post!!! Thanks!!!

  • @adrianomorsa8547
    @adrianomorsa8547 2 ปีที่แล้ว

    Hi Johnny, Connect Amazon MSK cluster to on-premises web server?

    • @JohnnyChivers
      @JohnnyChivers  2 ปีที่แล้ว +1

      Yes, just be careful with latency.

    • @adrianomorsa8547
      @adrianomorsa8547 2 ปีที่แล้ว

      @@JohnnyChivers Which way do you suggest doing
      ?

  • @sridharshan1614
    @sridharshan1614 ปีที่แล้ว

    we can do it in private to public
    like bastion host

  • @jkho8365
    @jkho8365 4 ปีที่แล้ว +1

    could you do 1 more on how to use consumer groups? Realise currently i get all. from beginning :)

    • @JohnnyChivers
      @JohnnyChivers  4 ปีที่แล้ว +1

      Yes. I'll add it to the list of future requested videos. I hope you found this one useful for getting started.

    • @jkho8365
      @jkho8365 4 ปีที่แล้ว +1

      @@JohnnyChivers yes it was, managed to do it

  • @manasupadhyay8101
    @manasupadhyay8101 2 ปีที่แล้ว +1

    Hey your video is awesome
    can you teach how to connect MSK from my local i am running spring boot application

    • @SwapnilGangrade1
      @SwapnilGangrade1 2 ปีที่แล้ว

      Did you get any leads? I am also looking to connect to MSK using spring boot application running locally

  • @raghupathym25
    @raghupathym25 3 ปีที่แล้ว +1

    Nice video man, can u help me on this error

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว +1

      It's a bit of a hard one without more detail.
      If you had your zoo keeper server up, and the client connected it maybe a case you need to restart your zookeeper server and reconnect the client. Make sure you do this from separate terminal windows.

    • @raghupathym25
      @raghupathym25 3 ปีที่แล้ว

      @@JohnnyChivers thank u, will try

    • @raghupathym25
      @raghupathym25 3 ปีที่แล้ว

      @@JohnnyChivers can't find commands to stop zookeeper on windows

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      Are not using msk and shhing into it? Same as the tutorial? If so, you'll be on Linux even if your using a Windows machine.

    • @raghupathym25
      @raghupathym25 3 ปีที่แล้ว

      @@JohnnyChivers yeah i am following the steps, but getting WARN Client session timed out, have not heard from server in 10026ms for sessionid 0x0

  • @johnrbl6458
    @johnrbl6458 2 ปีที่แล้ว +1

    nice

  • @nareshrenukuntla7806
    @nareshrenukuntla7806 3 ปีที่แล้ว +1

    Great, if you can increase the font size for next videos it would be helpful

    • @JohnnyChivers
      @JohnnyChivers  3 ปีที่แล้ว

      Thanks for watching Naresh. I’ll increase the font size.

    • @c1i2s3c4o5
      @c1i2s3c4o5 ปีที่แล้ว

      yes, you could have maximized your ec2 putty windows , audio could have been little louder, also windows flipping was little faster, btw great content all in all!!!

  • @ramachandraraopamidimarri1578
    @ramachandraraopamidimarri1578 ปีที่แล้ว

    Video Volume is very low

  • @kevinmilner2072
    @kevinmilner2072 ปีที่แล้ว

    I really wish I could hear what you are saying.

  • @hoddybhaba6704
    @hoddybhaba6704 2 ปีที่แล้ว

    audio quality is not good

  • @srinivasamaddipati356
    @srinivasamaddipati356 2 ปีที่แล้ว

    Too low audio and font size.

  • @samarthkulkarni6947
    @samarthkulkarni6947 2 ปีที่แล้ว

    aws kafka get-bootstrap-brokers --cluster-arn arn:aws:kafka:us-east-1:022942928579:cluster/demo-cluster-1 --region us-east-1
    after hiting this command not getting output