rmoff's random ramblings
about talks

Building a Telegram bot with Apache Kafka and ksqlDB

Published May 18, 2020 by in KsqlDB, Telegram at https://rmoff.net/2020/05/18/building-a-telegram-bot-with-apache-kafka-and-ksqldb/

Imagine you’ve got a stream of data; it’s not “big data,” but it’s certainly a lot. Within the data, you’ve got some bits you’re interested in, and of those bits, you’d like to be able to query information about them at any point. Sounds fun, right?

Architecture high-level view

What if you didn’t need any datastore other than Apache Kafka itself to be able to do this? What if you could ingest, filter, enrich, aggregate, and query data with just Kafka? With ksqlDB we can do just this, and I want to show you exactly how, using a Telegram bot as the application looking up state from the inbound stream of events:

Animation of Telegram bot looking up statistics about Twitter users

To find out more you can: -

  • 📜 Read this full-length article

  • 🎥 Watch this tutorial

    ksqldb telegram bot screencap
  • 👾 Try the code yourself


Robin Moffatt

Robin Moffatt works on the DevRel team at Confluent. He likes writing about himself in the third person, eating good breakfasts, and drinking good beer.

Story logo

© 2025