Message Queue 1: Message Queue

Source: Internet
Author: User

Message Queue 1: Message Queue
Why Message Queue?

  • Decoupling 
    It is extremely difficult to predict the future needs of a project at the beginning of the project. An implicit data-based interface layer is inserted in the message queue during the processing process. Both interfaces must be implemented during the processing process. This allows you to independently expand or modify the processing processes on both sides, as long as they comply with the same interface Constraints
  • Redundancy 
    Sometimes the data processing process fails. Unless the data is persistent, it will be lost forever. Message Queues persist data until they are completely processed. This avoids the risk of data loss. In the "insert-retrieve-Delete" paradigm adopted by many message queues, before a message is deleted from the queue, you need to clearly indicate that the message has been processed. Ensure that your data is stored securely until you have used it.
  • Scalability 
    Because the Message Queue decouples your processing process, it is easy to increase the frequency of joining and processing the message. You only need to increase the processing process. You do not need to change the code or adjust parameters. Expansion is as simple as resizing the power button.
  • Flexibility & peak processing capability 
    In the case of a sharp increase in traffic, applications still need to play a role, but such traffic bursts are not common; it would be a waste of resources to be put on standby based on the ability to handle such peak access requests. Using Message Queue allows key components to withstand increasing access pressure, rather than completely crashing because of requests that exceed the load.
  • Recoverability 
    When some components of the system become invalid, the system will not be affected. Message Queue reduces the coupling between processes. Even if a process that processes messages fails, messages added to the queue can still be processed after the system recovers. This ability to allow retry or delay in processing requests is usually a difference between a slightly inconvenient user and a frustrated user.
  • Delivery guarantee 
    The redundancy mechanism provided by message queue ensures that messages can be actually processed, as long as a process reads the queue. On this basis, IronMQ provides a "delivery only once" guarantee. No matter how many processes collect data from the queue, each message can be processed only once. This is possible because a message is "preordered" and is temporarily removed from the queue. Unless the client explicitly indicates that the message has been processed, the message will be put back in the queue and can be processed again after a configurable period of time.
    • Sequence assurance
      In many cases, the order of data processing is very important. The message queue is originally ordered, and data can be processed in a specific order. IronMO ensures that the message paste is processed in FIFO (first-in-first-out) Order. Therefore, the position of a message in the queue is to retrieve its position from the queue.
    • Buffer
      In any important system, there will be elements that require different processing times. For example, loading an image takes less time than applying a filter. The message queue uses a buffer layer to help the most efficient task execution-writing to the queue can be processed as quickly as possible, without the constraints of the preparation process for reading from the queue. This buffer helps to control and optimize the speed at which data streams pass through the system.
    • Understanding data streams
      In a distributed system, it is a huge challenge to get a general impression about how long user operations will take and why. The message series help easily identify poorly performing processing processes or fields through the frequency of message processing, and the data streams in these areas are not optimized.
    • Asynchronous Communication
      In many cases, you do not need to process the message immediately. The message queue provides an asynchronous processing mechanism that allows you to put a message into the queue but does not process it immediately. You can put messages into the queue as much as you want, and then process them as you like.
Message Queue 1 Message Queue 2 Message Queue 3 message queue 4 Message Queue 5 Message Queue 6 Message Queue 7

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.