Telegram bot forwarding updates to Kafka or RabbitMQ, configurable via env, no code needed.
389
Producer Bot is a Docker-ready Telegram bot that acts as a message relay layer between Telegram and your messaging infrastructure.
Instead of handling updates locally, it forwards every incoming Telegram update directly to a message broker โ either Apache Kafka or RabbitMQ โ enabling scalable, decoupled bot architectures.
It is designed for zero-code configuration using standard Spring Boot properties, making it extremely easy to deploy and integrate into existing systems.
๐ Official project site: easygram.osoncode.uzโ
This bot follows a producer-only architecture:
๐ All actual bot logic is handled downstream by consumer services
Supports:
Works with:
.envTelegram โ Producer Bot โ Message Broker โ Consumer Bot(s)
bot:
image: osoncode/easygram-producer-bot:0.0.5
build: .
environment:
# โโ Required โ provide in .env file โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
easygram.token: "${easygram.token}"
# โโ Transport: LONG_POLLING (default) or WEBHOOK โโโโโโโโโโโโโโโโโโโโโโ
# easygram.update.transport: WEBHOOK
# easygram.update.webhook.url: https://example.com/webhook
# easygram.update.webhook.path: /webhook
# easygram.update.webhook.secret-token: <secret>
# โโ Messaging โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
easygram.messaging.type: PRODUCER
easygram.messaging.forward-only: "true"
easygram.messaging.producer.type: RABBIT
easygram.messaging.rabbit.exchange: easygram-exchange
easygram.messaging.rabbit.queue: easygram-updates
easygram.messaging.rabbit.routing-key: easygram.updates
easygram.messaging.rabbit.create-if-absent: "true"
# โโ RabbitMQ connection โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
spring.rabbitmq.host: rabbitmq
spring.rabbitmq.port: "5672"
spring.rabbitmq.username: rabbit
spring.rabbitmq.password: rabbit
ports:
- "8080:8080" # only needed for WEBHOOK mode
depends_on:
rabbitmq:
condition: service_healthy
restart: on-failure
| Mode | Description |
|---|---|
| Long Polling โ Kafka | Default setup, easiest to run locally |
| Long Polling โ RabbitMQ | Simple queue-based setup |
| Webhook โ Kafka | Production-grade streaming |
| Webhook โ RabbitMQ | Production queue-based |
{
"update_id": 123456,
"message": {
"text": "Hello bot",
"chat": {
"id": 987654
}
}
}
Producer Bot transforms Telegram bots into:
Producer Bot = Telegram โ Broker bridge
Content type
Image
Digest
sha256:800421e89โฆ
Size
117.5 MB
Last updated
3 months ago
docker pull osoncode/easygram-producer-bot:0.0.6