Telegram Bots Connector

Enhance the performance and flexibility of your Telegram-based service by integrating a message queue with Kafka.

This Docker solution enables you to set up a webhook for your Telegram bot, receive updates, and forward them all to Kafka. The service is optimized for fast and reliable operation, focusing solely on message delivery without any data processing.

Telegram Kafka Connector

Components

For what?

Then you should try telegram-proxy-messages. Just create a bot that Telegram users will write to and specify which chat to forward messages to. You will get a completely anonymous forwarding of messages with the ability to respond to them through a single chat.

Architecture

What’s happening? Nothing complicated. The service’s only task is to subscribe to updates, receive them, and send them to Kafka, where other consumers can then read the data.

graph TD
    Telegram[Telegram]
    Nginx[Nginx]
    Kafka[("Kafka")]
    
    Telegram ==> |Receiving new events| Nginx

    TKC1[tkc #1]
    TKC2[tkc #2]
    Nginx --> TKC1
    Nginx --> TKC2

    TKC1 -->|Saving| Kafka
    TKC2 -->|Saving| Kafka

    Kafka --> AnyConsumer1[Consumer #1]
    Kafka --> |Get new events| AnyConsumer2[Consumer #2]
    Kafka -->  AnyConsumer3[Consumer #3]