This series is currently planned to write four articles, namely configuration, example, WCF release, and practice. Of course, Food addition is not ruled out.
RabbitMQ is a complete and usable enterprise Message System Based on AMQP protocol standards. He complies with the Mozilla Public License open-source protocol. An industrial-level MQ server implemented using Erlang.
RabbitMQ official site: http://www.rabbitmq.com/
AMQP(Advanced Message Queue Protocol) is an application layer protocol specification used for asynchronous message transmission. It serves as a line layer protocol rather than an API (such as JMS ), the AMQP client can send and accept messages without any source. The original purpose of AMQP is to provide a message protocol that can collaborate with each other in the financial sector, while the goal is to provide a common building tool for the general message queue architecture. Therefore, message-oriented middleware (MOM) systems, such as Publish/subscribe queues, are not implemented as basic elements. Instead, by sending simplified AMQ entities, users are given the ability to build such entities. These entities are also part of the specification, forming a level at the top of the online timeline Protocol: AMQP model. This model unifies the message mode, such as the publishing/subscription, queue, transaction, and stream data mentioned earlier, and adds additional features, such as easier scalability and content-based routing.
At present, this open-source project is very mature and applied in financial systems and other fields. It features high concurrency efficiency and high reliability, and provides the corresponding. net client implementation (including the source code ).
. NET client download link: http://www.rabbitmq.com/dotnet.html, the latest version 2.1.1
There are many introductions on the installation of rabbitmq (including clusters) on the linux platform on the Internet, as follows:
The configuration in the window environment is as follows:
First download the erlang Runtime Environment (Windows binary): http://erlang.org/download.html
Select the version of the program to install, such as the http://erlang.org/download/otp_win32_R12B-5.exe
Note: The environment in this article is installed on the D Drive, for example, D: \ Program Files (x86) \ erl5.6.5.
Set the environment variables as follows:
D: \ rabbitmq \ sbin> rabbitmq-server
Activating RabbitMQ plugins...
Download RabbitMQ Server (the latest version is 2.1.1), the link is as follows: http://www.rabbitmq.com/server.html
Download and install the Windows Installation Package to drive D:
Note: source code link http://www.rabbitmq.com/releases/rabbitmq-server/v2.1.1/rabbitmq-server-2.1.1.zip
Run the above rabbitmq server program on the CMD command line:
In this way, the rabbitmq server will run.
Before using rabbitmq, if you are not familiar with this project, you can take a look at the two quick links:
Get started with AMQP and RabbitMQ
Rabbitmq-Basics of 6-rabbitmq
The following uses the rabbitmqctl Console Command (located at D: \ rabbitmq \ sbin>) to configure the vhost, create a user, password, and bind permissions.
First, create vhosts. The command is as follows:
Add and create a VM:
D: \ rabbitmq \ sbin> rabbitmqctl list_vhosts
All VM information can be displayed as specified below:
Add the user name and password (daizhj, password: 617595) as follows ):D: \ rabbitmq \ sbin> rabbitmqctl add_user daizhj 617595 // Note: Modify the User Password: rabbitmqctl change_password username newpassword
Bind User Permissions:D: \ rabbitmq \ sbin> rabbitmqctl set_permissions-p dnt_mq daizhj ".*"".*"".*"
List User Permissions:D: \ rabbitmq \ sbin> rabbitmqctl list_user_permissions daizhj // Note: Clear the user permission rabbitmqctl clear_permissions [-p vhostpath] username
Now, the rabbitmq environment configuration on a single machine is complete. In the next article, we will introduce how to use its. net client for simple development.
Tags: Rabbitmq, NET
Author: daizhj, Dai zhenjun