Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuanyu90221/rabbitmq_go_connect_demo
https://github.com/yuanyu90221/rabbitmq_go_connect_demo
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/yuanyu90221/rabbitmq_go_connect_demo
- Owner: yuanyu90221
- Created: 2020-09-15T07:33:46.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-09-15T07:38:49.000Z (over 4 years ago)
- Last Synced: 2024-04-21T14:01:02.484Z (9 months ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rabbitmq with golang
## introduction
This repository is about use RabbitMQ to implement a WorkQueue with addTask
## RabbitMQ with golang
## Consumer
This consumer create a go channel to consume the message from rabbitmq with queuename = 'add'And use a goroutine to receive data from consume channel
And sum the data from channel
## Producer
This producer publish a the data to the rabbitmq with queuename = 'add'the data contains 2 integer numbers, Number1, Number2
## Advantage of this pub/sub pattern
1 All the request will be queue on ampq until the consumer consume, less data loss
2 consumer and producer don't have to be connected directly and can be asynchronize handle
## reference article
[work-queue-with-go-and-rabbitmq](https://medium.com/@masnun/work-queue-with-go-and-rabbitmq-b8c295cde861)