Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the core components in rocketMq

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces what are the core components in rocketMq. It is very detailed and has a certain reference value. Friends who are interested must read it!

In rocketMq, the core 4 components are namesrv, broker, consumer and producer.

Broker: message storage center, mainly used to store messages and provide services through namesrv.

Namesrv: a stateless registry that stores meta-information about broker and provides it to producer to find broker information during message delivery and during consumer consumption messages.

Producer: the message producer who obtains the address of the broker through namesrv and sends messages.

Consumer: the message consumer, obtains the address of the broker through namesrv and consumes the message.

Introduction to rocketMq deployment

RocketMq deployment diagram

Subdivision of Cluster concept in rocketMq

Description:

RocketMq actual deployment diagram, each component can appear in the form of a cluster.

Producer: mark yourself as a cluster by the name of producerGroup.

Consumer: mark yourself as a cluster by the name of consumerGroup.

Namesrv: there is no communication with each other and multiple machines are deployed to mark themselves as a pseudo-cluster.

Broker: the cluster is marked by clusterName. Each broker indicates the cluster at cluster level by clusterName, the cluster at broker level by brokerName, and the master-slave identity by brokerId.

Introduction to rocketMq message Store

RocketMq message Store

Description:

The message storage of the rocketMq is carried out through a secondary index, where the actual messages are stored in the logical queue of the Commit Log (the disk file messages are written sequentially), and the consume queue stores the data to be consumed by each message consumption queue and points to commit Log.

Introduction to RocketMq online configuration

RocketMq actual data storage

Description:

RocketMQ online environment of the real storage, each broker storage data format is similar to the above image.

Config directory

ConsumerFilter: save the message filtering configuration on the client side. The record should be added to this file when the consumer side configures the filtering rules.

ConsumerOffset: consumption progress offset, which is distinguished by topic@consumerGroup. 0 of 0 125 represents queue, and 125 represents consumption offset.

ConsumerOffset

DelayOffset: delay queue consumption progress, where 2 represents delay granularity and 2000 represents consumption progress.

DelayOffset

SubscriptionGroup: represents the consumer group that subscribes to consumption.

SubscriptionGroup

The information of topic in topic:rocketMq can be understood as the granularity of business message grouping. Generally, a topic is a logical message collection of a class of business.

Topic

Commitlog directory

The location where the rocketMq actually stores messages.

Consumequeue directory

% DLQ%@ConsumeGroupA: consume the dead letter queue of the packet and save the index to commit log.

% RETRY%@ConsumeGroupA: consumes the enriched queue of packets and holds the index to commit log.

SCHEDULE_TOPIC_XXXX: delay message queues, saving the index to commit log.

The consumption queue store for TOPICA:topic, which holds the index to commit log.

These are all the contents of the article "what are the core components in rocketMq?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report