https://github.com/escalopa/gobrokers
A practice area of using golang with messsage brokers
https://github.com/escalopa/gobrokers
golang kafka message-broker rabbitmq
Last synced: 2 months ago
JSON representation
A practice area of using golang with messsage brokers
- Host: GitHub
- URL: https://github.com/escalopa/gobrokers
- Owner: escalopa
- License: apache-2.0
- Created: 2023-02-16T09:33:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T14:11:59.000Z (over 2 years ago)
- Last Synced: 2025-01-19T15:20:07.675Z (4 months ago)
- Topics: golang, kafka, message-broker, rabbitmq
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gobrokers
A practice area of using golang with messsage brokers
## RabbitMQ Exampel 🐰
In this example we creaete a `group` to which many `consumers` can subscribe to. The `consumers` will receive messages from the `group` and process them.
So the message that is being published is received by all the `consumers` that are subscribed to the `group`, Which is the case in a group chat
### Setup 🔨
1. Run rabbitmq server with docker compose
```bash
docker compose -f rabbitMQ/docker-compose.yml up
```### Run 🚀
1. Run the publisher 📦
```bash
go run rabbitMQ/prod/main.go
```2. Run the consumer 🍹
You can run multiple consumers by changing the `queueName` in the cli arg, Currently the `queueName` is set to `my-queue0` & `my-queue1`, But u can make more edits to the `rabbitMQ/prod/main.go` file to create more queues
```bash
go run rabbitMQ/consumer/main.go -queueName="my-queue0"
```