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

Rockermq & kafka consumption restriction

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Kafka

A partition under topic can only be consumed by one explorer thread under the same consumer group, but the reverse is not true, that is, an explorer thread can consume data from multiple partitions, such as ConsoleConsumer provided by Kafka. By default, there is only one thread to consume data from all partitions. Therefore, the number of divisions determines the upper limit of the number of consumers in the same group.

Rockermq

Rocketmq's topic has the concept of queue, that is to say, there can be multiple queues on a node, which can greatly improve concurrency, while kafka can only be consumed by one process per partition, so the concurrency limit is very large, and the number of partitions on a single machine cannot be too large, and there is obvious instability when there are more than 64 partitions, but rocketmq supports tens of thousands of queues, so the concurrency performance is very good.

Create command

Sh / root/rocketmq/bin/mqadmin updateTopic-c whk-n "ip"-t offer-r 1-w 1-o true

Parameter description

To create a topic, you need to specify the parameters,-b, create topic-c on broker, specify cluster, create topic-n, specify namesrv address. In cluster mode, you must obtain the broker address from namesrv-the name flag of t topic-the number of read and write queues of r queue. It is recommended to equal-p read and write permissions of queue-o to be studied as to whether the configuration of globally ordered messages is guaranteed.

Rocketmq, pay attention.

Https://blog.csdn.net/zhaozhenzuo/article/details/76791495

Referenc

Https://blog.csdn.net/chunlongyu/article/details/54018010

Https://www.cnblogs.com/freeweb/p/7817968.html

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