Talk about Internet backend infrastructure http://www.rowkey.me/blog/2016/08/27/server-basic-tech-stack/
The invocation between service can be divided into synchronous calls and asynchronous invocations. How does an asynchronous call proceed? A common way is to use Message Queuing, where the caller puts the request in the queue to return, and then waits for the service provider to go to the queue to fetch the request for processing, and then return the result to the caller (which can pass the callback).
Asynchronous invocation is a very common application scenario for message middleware. In addition, Message Queuing scenarios include the following:
Decoupling: A transaction that only cares about the core process and needs to rely on other systems but less important things, with notifications, without waiting for results.
Final consistency: Refers to the state of the two systems are consistent, either success, or both fail, there can be a certain delay, as long as the final consistency can be achieved.
Broadcast: This is the most basic feature of Message Queuing. Producers only need to post messages, without having to worry about which subscribers are consuming messages.
Fault peaks and flow control: when the upstream and downstream systems have different processing power, they need to be like a message queue to separate the two systems as buffers.
The current mainstream Message Queuing software, mainly in the following types:
The simplest message queue in Activemq:java is the implementation of JMS, which does not specify the ordering, security, or re-sending of messages.
RabbitMQ: Is the implementation of the AMQP protocol, the order of the message, security, re-hair, etc. are well supported. Better suited for message transmission in business scenarios that do not allow data loss and transactional requirements.
Kafka: is a log-based message queue, the underlying dependent on the sequential read of the file, is append-only. For some massive log transport scenarios that are insensitive to data loss and emphasize performance. is a very hot technology in the big data field in recent years.
ZeroMQ: is a network programming pattern library, the common Network request form (packet management, link management, publish subscription, etc.) modeled, modular, in short, the socket above, MQ. For MQ, network transport is only a part of it, more need to deal with is the message store, routing, broker Service discovery and lookup, transaction, consumption mode (ACK, re-investment, etc.), cluster services, etc.
List of message queues