My architectural dream: (Ninety-nine) RocketMQ's high availability mechanism of message middleware-high availability of message consumption

Welcome everyone to pay attention to my official account [ Lao Zhouchao Architecture ], the principle of Java back-end mainstream technology stack, source code analysis, architecture, and various Internet solutions with high concurrency, high performance, and high availability.

I. Introduction

In the first two articles we introduced

My architectural dream: (Ninety-seven) RocketMQ's high-availability mechanism for message middleware-high availability of message storage
My architectural dream: (Ninety-eight) RocketMQ's high-availability mechanism for message middleware-high availability of message sending

In this article, let's talk about how to ensure high availability of message consumption.

If we want to know the high availability of news consumption, then we have to know how news is consumed. We know that each Consumer in the Consumer cluster has a consumer group. How do multiple consumers in that consumer group queue the message (a topic corresponds to multiple message queues), and how do consumers load balance? How can a consumer concurrently consume messages from a message queue (a consumer can correspond to multiple message queues, and a message queue can only be consumed by one consumer)? This is the message load balancing and redistribution mechanism on the consumer side. This is left to you to think about.

This article focuses on the mechanism of high availability of message consumption. In our business scenarios, we really cannot avoid the failure of message consumption, such as network abnormalities, abnormal business logic itself, and third-party exceptions called by our own business without exceptions. But no matter what the situation is, as a message middleware, you have to make sure that the message will not be lost when I consume the message. If it is an important business and the data is lost, no one dares to use this product, so the message consumption is highly available. It is also extremely important. Even if the message continues to fail to consume, the data cannot be lost. That Roc

Guess you like

Origin blog.csdn.net/riemann_/article/details/114955655