amqp
MQ-dispatcher
amqp | MQ-dispatcher | |
---|---|---|
6 | 1 | |
4,801 | 0 | |
- | - | |
1.9 | 10.0 | |
8 months ago | over 1 year ago | |
Go | Go | |
BSD 2-clause "Simplified" License | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
amqp
-
message brokers, a brief walk-through
Basically this code, connects to our rabbitmQ using the streadway/amqp package which is the golang standard library for communicating with rabbitmQ, next we declare a unique channel to enable us pass across message to a specific queue. Then we call the Consume function which takes in a parameter of *amqp.Channel which is the channel we created previously.
-
How to plan and execute a large number of tasks in Go?
For rabbitmq I used -> https://github.com/streadway/amqp which is deprecated now for -> https://github.com/rabbitmq/amqp091-go
-
How to send RabbitMQ messages to http.ResponseWriter?
"github.com/streadway/amqp"
-
Any recommended a ‘windows friendly’ c++ library for AMQP please?
I’d also recommend looking into learning Go. I’ve been using this library and it’s great.
-
Which RabbitMQ client library do you use in production?
We're currently using streadway/amqp as RabbitMQ client library. It is well-documented and very stable on the one hand, but on the other hand, it is pretty low-level and leaves up a lot of things to the user. For example, we're in charge of handling the connections and channels ourselves and implemented our very own error handling and reconnection logic as well.
-
Introducing my first open source project: Roger, Rabbit: A RabbitMQ client and drop-in replacement for streadway/amqp with automatic redials, method middleware, and more!
AMQP is a messaging protocol most commonly used by RabbitMQ. As I discuss in the README, the officially sanctioned RabbitMQ driver, streadway/amqp isamazing but does not support automatic redials. If your connection to the message broker goes down, you have to find a way to distribute a new connection to all routines utilizing it. It's always a tedious exercisee, especially when you have multiple projects that work with RabbitMQ.
MQ-dispatcher
-
message brokers, a brief walk-through
So the Consume function basically reads all the messages currently available in the queue and serializes them to an alert variable, then it sends a tweet to a specified twitter account with the alert's message as the tweet's content, it also sends an email with the alert's topic as subject and the alert's message as the email's content to my email address. I'm obviously not gonna go into the details of how to programmatically create a tweet or send an email. But if you're interested in learning how to send Emails with golang, you should definitely take look at my article Sending E-mails with Go. All the sample codes written here are publicly available on this github repository with instructions to run them.
What are some alternatives?
go-rabbitmq - A wrapper of streadway/amqp that provides reconnection logic and sane defaults
fastapi - FastAPI framework, high performance, easy to learn, fast to code, ready for production
RabbitMQ - Open source RabbitMQ: core server and tier 1 (built-in) plugins
pydantic - Data validation using Python type hints
PHP AMQP - The most widely used PHP client for RabbitMQ
rogerRabbit-go - wrapper & drop-in replacement for streadway/ampq with automatic reconnects
gue - Golang queue on top of PostgreSQL
o3 - Open-source implementation of the Threema protocol in Go.
taskq - Golang asynchronous task/job queue with Redis, SQS, IronMQ, and in-memory backends
rabbitmq-dump-queue - Dump messages from a RabbitMQ queue to files, without affecting the queue.
Benthos - Fancy stream processing made operationally mundane
machinery - Machinery is an asynchronous task queue/job queue based on distributed message passing.