WMQX is a support http protocol MQ service based on RabbitMQ development, his predecessor was wmq, Because of the differences in code architecture and implementation, a new project is created called WMQX. I am here to thank his author and my friend snail007. Of course, you can also understand that WMQX is an enhanced version of wmq.
RabbitMQ is a lightweight messaging queue middleware that is easy to deploy locally and in the cloud and supports multiple messaging protocols. RabbitMQ can be used in many scenarios and supports multiple language SDK. Usually you use RabbitMQ like this:
- As a productor:
- Write code to connect to RabbitMQ and open a channel.
- Write code to declare an exchange and set related properties.
- Write code to declare a queue and set the associated properties.
- Writing code USES routing key to establish a binding relationship between exchange and queue.
- Write code to send messages to RabbitMQ.
- As a consumer:
- Write code to connect to RabbitMQ, open a channel, start the consuming process, wait for the message to be received, and process the consuming business logic.
- RabbitMQ connections, Exchange, Queue declarations and modifications are coupled with business code, increasing the cost of development and maintenance.
- When modifying the consumer's business logic, you may need to restart the consumption process frequently.
- For first-time users of MQ, it takes time and labor to understand how RabbitMQ works and write code for production and consumption.
- ...
- Pull out the connection of RabbitMQ, the declaration of Exchange, Queue and other non-business operations to provide services separately, and the operation of Exchange and Queue is provided to users in a friendly API.
- To help the user implement the consuming process of each message, the user only needs to provide the API interface of the consumer, and the consuming process calls the corresponding consumer API after waiting for the message. The consumer business logic changes, only the API needs to be modified, and the consumer process does not need to be restarted.
- For the first time using the MQ or not clear the principle of the RabbitMQ users, don't need to understand the use of the RabbitMQ and coded, need only through the HTTP access services, can be quickly using the message queue.
So WMQX was born. The working principle is as follows:
- There is no need to connect to RabbitMQ, providing a high-performance, highly available HTTP interface to manage messages
- To help users realize the consumption process, they only need to add the corresponding consumer API through the interface to realize the consumption or message push
- Each consumer is handled by a separate goroutine, and consumers consume each other independently
- Simple and convenient deployment, support cross-platform deployment, low use and access costs
- The WMQX consuming process forwards the original request information to the corresponding consumer URL by sending the message through the HTTP publishing interface
- Provide a complete set of background management UI, see WMQX-UI
If you don't have a RabbitMQ service, you'll need to install it yourself, which is pretty simple, see http://www.rabbitmq.com/download.html
Download the latest binary from https://github.com/phachon/wmqx/releases
# Unpack
$ tar -zxvf wmqx-linux-amd64.tar.gz
# The default configuration file use wmqx.conf in the current directory
$ cp config.toml wmqx.toml
# config wmqx.conf
[rabbitmq]
host = "RabbitMQ Server Ip"
port = 5672
username = "test"
password = "123456"
vhost = "/"
# start run
$ ./wmqx
# Of course, you can also specify the configuration file path to start
$ ./wmqx --conf wmqx.conf
see Contribution
- If you like the project, please Star.
- If you have any problems in the process of use, welcome submit Issue.
- If you find and solve bug, welcome submit Pull Request.
- If you want to redevelop, welcome Fork.
- If you want to make a friend, welcome send email to phachon@163.com.
MIT
Create By phachon@163.com