Comparison of four message queues

ActiveMQ and RabbitMQ is the difference?

About the article does not have much content, Come links: HTTPS: //blog.csdn.net/qq_30764991/article/details/80573352,
https://blog.csdn.net/qq_30764991/article/details/80516961 a lot of learning content, please self-learning. About appreciates the code is actually big, ha ha, you have to thank this great entrepreneur Chinese educator Mr. Ma (JACK MA), this is voluntary, you earn from Alipay there, you see or do not see it is there ,且行且珍惜short way of life. Come on! every body! everyone! everystudent!

1. ActiveMQ / ApolloMQ 
  advantages: a veteran of the message queue, using the Java language. JMS support for the best, multi-thread concurrency, resource consumption is relatively large. If your primary language is Java, you can key consideration. 
  Cons: Because of a long history and many historical burden, updated version very slow. Zookeeper cluster model to rely on to achieve. The latest product architecture is named Apollo, known as the next generation of ActiveMQ, there is less case. 

2. RocketMQ / Kafka 

  advantages: specifically for the mass transfer message to create, advocate the use of pull mode, natural clusters, HA, load balancing support. Saying Again, not suitable to see you have so much volume. 
  Cons: The so-called fish and can not have both, giving up some of the messaging middleware flexibility to use the narrow scene, to be concerned about whether your business model fit, otherwise the cottage disguised very awkward to use. In addition, RocketMQ no client under .NET available. RocketMQ body famous door, but few users, smaller ecological, after all, the message of this small amount can reach body mass of companies, you can go directly to buy Ali cloud messaging service. Kafka ecological improvement, the code is written in Scala language, some of the lower reliability than RocketMQ. 

  3. RabbitMQ 
  advantages: Eco-rich, user public, there are a lot of people stepped in front of the pit. Leading AMQP protocol implementation, support a variety of scenarios. Taobao MySQL Cluster have to use it for internal communications, OpenStack open source cloud platform communication components, it was first used in the financial industry. 
  Drawback: Erlang Code You Hold maintained, although not a natural cluster of Erlang, RabbitMQ but done in terms of high availability is not particularly handy, do not believe advertising?.

1.ActiveMQ/ApolloMQ

Pros: Veteran's message queue, using the Java language. JMS support for the best, multi-thread concurrency, resource consumption is relatively large. If your primary language is Java, you can key consideration.
  Cons: Because of a long history and many historical burden, updated version very slow. Zookeeper cluster model to rely on to achieve. The latest product architecture is named Apollo, known as the next generation of ActiveMQ, there is less case.
* ActiveMQ.

The backbone of the Java world. It has a long history, and is widely used. It is also cross-platform, for those non-Microsoft platform products provide a natural integrated access point. However, it only ran the MSMQ is likely to be considered.

Summary:

Apache ActiveMQ is produced, most popular, strong ability to open source message bus. ActiveMQ is a fully supported JMS1.1 and J2EE 1.4 specification JMS Provider realize, despite the JMS specification has been introduced a long time ago, but in the middle of today's JMS J2EE application still plays a special status.

expand:

JMS: (http://baike.baidu.com/subview/157103/12665866.htm)

I.e. Java Message Service JMS (Java Message Service) application program interface, API is a Java platform on message-oriented middleware (MOM) for between two applications, or distributed system to send messages asynchronously communication. Java Message Service is a specific platform-independent API, MOM vast majority of providers offer support for JMS.

Feature List:

⒈ languages ​​and write a client agreement. Language: Java, C, C ++, C #, Ruby, Perl, Python, PHP. Application Protocol: OpenWire, Stomp REST, WS Notification, XMPP, AMQP

⒉ JMS1.1 and fully supports J2EE 1.4 specification (persistent, XA messages, transactions)

⒊ support for Spring, ActiveMQ can be easily built using Spring to go inside the system, but also supports the characteristics of Spring2.0

⒋ through a common J2EE server (such as Geronimo, JBoss 4, GlassFish, WebLogic) test, which configure the JCA 1.5 resource adaptors, allowing ActiveMQ can automatically be deployed on any J2EE 1.4 compatible server business

⒌ supports multiple transport protocols: in-VM, TCP, SSL, NIO, UDP, JGroups, JXTA

⒍ JDBC support provided by high-speed messages and journal persistence

⒎ guarantee from the design of high-performance clustering, client - server, point to point

⒏ support Ajax

⒐ support and integration of Axis

⒑ it can easily be invoked embedded JMS provider, to test

2. RocketMQ/Kafka

  Benefits: Designed to deliver the message to create a massive, advocated the use of pull mode, a natural cluster, HA, load balancing support. Saying Again, not suitable to see you have so much volume.
  Cons: The so-called fish and can not have both, giving up some of the messaging middleware flexibility to use the narrow scene, to be concerned about whether your business model fit, otherwise the cottage disguised very awkward to use. In addition, RocketMQ no client under .NET available. RocketMQ body famous door, but few users, smaller ecological, after all, the message of this small amount can reach body mass of companies, you can go directly to buy Ali cloud messaging service. Kafka ecological improvement, the code is written in Scala language, some of the lower reliability than RocketMQ.

  3. RabbitMQ
  advantages: Eco-rich, user public, there are a lot of people stepped in front of the pit. Leading AMQP protocol implementation, support a variety of scenarios. Taobao MySQL Cluster have to use it for internal communications, OpenStack open source cloud platform communication components, it was first used in the financial industry.
  Drawback: Erlang Code You Hold maintained, although not a natural cluster of Erlang, RabbitMQ but done in terms of high availability is not particularly handy, do not believe advertising?.
================================================== ================================================== ============

Now that the growing amount of data processing, message queue for increasingly high demand, Here are more common on the market several message queues, I hope you can help in future interviews.

MSMQ.
This is the only thing Microsoft products are considered valuable. This thing is not complicated, in addition to receiving and sending no other; hard it has some limitations, such as maximum volume of the message is 4MB. However, by and some, like MassTransit or NServiceBus such software connection, it can solve these problems.

Introduction:
MicroSoft the Message Queuing (Microsoft Message Queue) is an asynchronous transfer mode communicate with each other between a plurality of different applications, applications communicate with each other may be distributed on the same machine, it can also be distributed over network coupled in space any position. Its implementation principle is: the sender of the message you want to send the information into a container (we call Message), and then save it to a message queue (Message Queue) a common space of a system; local or a remote message receiving program message sent to it and then removed from the queue for processing.

Real:
In the message passing mechanism, there are two more important concepts. Is a message, it is a queue. A communication information message is required for both transmitted, it may be a variety of media, such as text, sound, image and the like. The final message of the way of understanding, the two sides agreed in advance to messaging, the benefits of doing so is that one is equivalent to a simple data encryption, two own definition of the format to save the amount of transfer traffic. And send a message may contain identification of the recipient, so that only the specified user can see only pass the message to him whether the operation was successful and the return receipt. Message may also contain a time stamp, for certain applications for processing time related to the recipient. The message may also contain an expiry time, it shows if the message has not been reached within the specified time is invalid, the application of which the main application associated with the timing more closely.

Message queue is sending and receiving messages of a public storage space, it may be present in physical memory or in a file. Message may be transmitted in two ways, i.e. courier (Express) and recoverability mode (Recoverable), their difference is that, in order to quickly courier delivery of the message, the message is placed in memory, to physically hold the disk, to obtain a high processing capacity; resume mode in each step of the delivery process, regarded in the message is written to the physical disk to obtain a better resiliency. Can be placed in the message queue sender, the receiver is located on the machine may also be placed separately on another machine. Because of flexibility in the placement of the message queue, the reliable transport mechanism is formed message. When saving the message queue and restarting machine fails, messages sent in a recoverable mode can be restored to the state before the failure occurs, and the message is sent by courier lost. On the other hand, the use of message passing mechanism, the sender unnecessary to worry about whether the recipient has to start, if the fault occurs, and so non-essential elements, as long as the message is successfully sent, it can be considered processing is complete, the other party may in fact have not even boot, or when the actual completion of the transaction may have been the next day.

Role:
the use of the benefits brought by MSMQ is: Because it is asynchronous communication, either the sender or recipient do not have to wait for the other to return a success message, you can perform the rest of the code, thus greatly improving the ability to handle things; when information transfer process, failure information transmitting mechanism having a certain function recovery; the MSMQ message passing communication messages that both have different physical platform possible.

Use on Microsoft's .net platform MSMQ features they offer, you can easily create or delete a message queue, send or receive messages, and even the message queue management.

* ActiveMQ.
Backbone of the Java world. It has a long history, and is widely used. It is also cross-platform, for those non-Microsoft platform products provide a natural integrated access point. However, it only ran the MSMQ is likely to be considered.

Description:
ActiveMQ Apache is produced, most popular, strong ability to open source message bus. ActiveMQ is a fully supported JMS1.1 and J2EE 1.4 specification JMS Provider realize, despite the JMS specification has been introduced a long time ago, but in the middle of today's JMS J2EE application still plays a special status.

Tsubuseten:
JMS: (Http://Baike.Baidu.Com/subview/157103/12665866.Htm)

I.e. Java Message Service JMS (Java Message Service) application program interface, API is a Java platform on message-oriented middleware (MOM) for between two applications, or distributed system to send messages asynchronously communication. Java Message Service is a specific platform-independent API, MOM vast majority of providers offer support for JMS.

Feature List:
⒈ languages and write a client agreement. Language: Java, C, C ++, C #, Ruby, Perl, Python, PHP. Application Protocol: OpenWire, Stomp REST, WS Notification , XMPP, AMQP

⒉ JMS1.1 and fully supports J2EE 1.4 specification (persistent, XA messages, transactions)

⒊ support for Spring, ActiveMQ can be easily built using Spring to go inside the system, but also supports the characteristics of Spring2.0

⒋ through a common J2EE server (such as Geronimo, JBoss 4, GlassFish, WebLogic) test, which configure the JCA 1.5 resource adaptors, allowing ActiveMQ can automatically be deployed on any J2EE 1.4 compatible server business

⒌ supports multiple transport protocols: in-VM, TCP, SSL, NIO, UDP, JGroups, JXTA

⒍ JDBC support provided by high-speed messages and journal persistence

⒎ guarantee from the design of high-performance clustering, client - server, point to point

⒏ support Ajax

⒐ support and integration of Axis

⒑ it can easily be invoked embedded JMS provider, to test

 

 

RabbitMQ.
It supports the open Advanced Message Queuing Protocol (AMQP, Advanced Message Queuing Protocol) , to avoid the closure manufacturers fundamentally, in any language of the various customers can benefit from it. This protocol provides a message transmission mode rather complicated, so basically does not require complex or NServiceBus of MassTransit.

Not much to say, we have learned.

ZeroMQ.
The development of this product is part of AMQP Group, and also called OpenAMQ products. However, they are isolated from the dramatic AMQP out and complained that the product lost its way, becoming more and more complex. ZeroMQ has a unique non middleware mode, that is, with a few other different products being tested, you do not need to install and run a messaging server, or middleware. You only need a simple reference to ZeroMQ library, you can use NuGet installed, then you can have fun send messages between applications. Interestingly enough, they also used this language in the way of a powerful interprocess communication created in Erlang-style execution role in any such use ZeroMQ.

Description:
0MQ (ZeroMQ) is a lightweight messaging kernel. It can be used for C, C ++, Python, .NET / Mono, Fortran and Java. It runs on AIX, FreeBSD-based HP - Under UX, Linux and MacOS, OpenBSD systems, OpenVMS, QNX Neutrino, Solaris and Windows operating systems.

Development:
blog the garden there was a large cattle for ZeroMQ made a detailed supplement, interested students can go and see, provides the appropriate address below: http: //news.cnblogs.com/n/154000/

Test.
ActiveMQ Java needs to be installed on the target machine, RabbitMQ need Erlang environment. Install both products are not in trouble, but I wonder if it is to maintain the system adds a layer task. If this is a is selected, I need to make system maintenance people to understand and maintain their previously unfamiliar runtime.

ActiveMQ, RabbitMQ and MSMQ need to start the service process, which can be monitored and configured, there is another problem.

ZeroMQ, it is not middleware architecture, there is no need to run any services and processes. In fact, your application service endpoint play this role. This makes it very simple to deploy, but the fear is that you have no place to see if it has problems. For now I know, ZeroMQ only non-persistent queues. You can implement your own audit and data recovery capabilities where needed. Honestly, I'm not even sure whether it is listed in this test, how it works, and several other differences too.

Here are the test results. It displays the number of messages sent and received per second. 1K message 1 produced a total of one million throughout the process. Performing the test is performed on a Windows Vista.

 

Integrated down:

MSMQ receiving rate was 61.55% ↓

ActiveMQ receiving rate is 100% ↑

RabbitMQ receiving rate is 100% ↑

ZeroMQ receiving rate was 36.55% ↓

As you can see, ZeroMQ and the other is not a level. Its performance is surprisingly high. To be fair, ZeroMQ compared with several other like a monster head, despite this, the conclusion is clear: if you want an application to send messages as quickly as possible, you choose ZeroMQ. In the case where you do not care about the message occasionally lose some more valuable.

Although ZeroMQ speed is amazing, but that's the life of the data, we would rather reduce some of the demand is not willing to lose any of valuable data, comprehensive comparison of down, I think RabbitMQ is more suitable.

Guess you like

Origin www.cnblogs.com/lukelook/p/11229498.html