It’s June 15th, A.K.A Global Wind Day. In the spirit of renewable energy, we invite you to read Kai Waehner’s (of Confluent) blog post on using Kafka architecture to implement a smart grid. What is a smart grid? Read on! Also featured in today’s newsletter: tapping into the Flink community, detecting PII automatically in real time, and going back in time to your first GitHub commit.
Let’s go back to basics with kcat, a command line utility that helps test and debug Kafka projects. There are two modes in which kcat runs: consumer mode and producer mode. Let’s take a look at these two examples from Confluent’s docs.
kcat -b localhost:9092 -t mysql_users -C -c1
{"uid":1,"name":"Cliff","locale":"en_US","address_city":"St Louis","elite":"P"}
Above, we see kcat running in consumer mode, determined by the -C flag. (The -b and -t flags set the broker and topic, and the -c1 flag only outputs the first line.) It works by reading the messages from the topic and printing them to stdout.
kcat -b localhost:9092 -t new_topic -P
test
Here, kcat is running in producer mode since we’ve added the -P flag. It reads from stdin to send the message to the new_topic topic.
We hope you enjoyed our curated assortment of resources! If you’d like to provide feedback, suggest ideas for content you’d like to see, or you want to submit your own resource for consideration, send us an email at info@confluent.io!
If you’re viewing this newsletter online, know that we appreciate your readership and that you can get this newsletter delivered directly to your inbox by scrolling down to the bottom of the page and filling out the form.
P.S. If you want to learn more about Kafka or Confluent Cloud, visit our developer site at Confluent Developer.
We will only share developer content and updates, including notifications when new content is added. We will never send you sales emails. 🙂 By subscribing, you understand we will process your personal information in accordance with our Privacy Statement.