Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/szsascha/kafka-telegram-bot-example
Telegram webhook echo bot using Go and Kafka.
https://github.com/szsascha/kafka-telegram-bot-example
cicd deployment devops docker docker-compose github-actions golang kafka telegram-bot
Last synced: about 2 months ago
JSON representation
Telegram webhook echo bot using Go and Kafka.
- Host: GitHub
- URL: https://github.com/szsascha/kafka-telegram-bot-example
- Owner: szsascha
- Created: 2023-08-23T10:56:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-14T17:22:07.000Z (over 1 year ago)
- Last Synced: 2024-04-18T16:58:27.134Z (9 months ago)
- Topics: cicd, deployment, devops, docker, docker-compose, github-actions, golang, kafka, telegram-bot
- Language: Go
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Telegram echo bot using Kafka
With this repository I created a simple Telegram echo bot in order to learn more about Go and Kafka.
The echo bot consists of 3 services:
- telegram-callback: Endpoint for Telegram webhook. Writes content to incoming_messages Kafka topic.
- telegram-message-processor: Reads incoming_messages topic, processes the message and sent the client a message via outgoing_messages topic
- telegram-sender: Receives the outgoing_messages topic and creates the Telegram message## Futher notes
- The production environment uses a proxy like https://github.com/szsascha/caddy-proxy (HTTPS handling is done in the proxy)
- Run a service directly via `go run telegram-callback/telgram-callback.go`
- Set Telegram webhook via POST https://api.telegram.org/bot{{token}}/setWebhook?url=https://{{serveraddress}}/{{token}}
- The current setup is created for use in github actions only
- Kafka port docker internally: 29092
- Kafka port from outsite docker: 9092
- Keep your token safe!