RocketMQ message consumption polling mechanism PullRequestHoldService
1. General
Let's first look at the polling mechanism in the consumption process of RocketMQ. First, we need to add some pre knowledge related to consumption.
1.1 message consumption mode
RocketMQ supports a variety of consumption modes, including Push mode and Pull mode
Pull mode: users pull messages and update consumption progressPush mode ...
Posted by cbn_noodles on Tue, 01 Mar 2022 15:48:39 +0100
An InterruptException occurred when the RocketMQConsumer service was shut down
An InterruptException occurred when the RocketMQConsumer service was shut down
Background summary
The main problem is the version upgrade
Old version core rocketmq dependency <dependency>
<groupId>org.apache.rocketmq</groupId>
<artifactId>spring-boot-starter-rocketmq</artifactId>
<version>${ve ...
Posted by akumakeenta on Tue, 01 Mar 2022 11:00:42 +0100
Teach your wife by hand: RocketMQ cluster mode - RocketMQ Master-Slave - Multi Master and multi Slave mode
Technical work should be rewarded
follow+Click three times (like, comment, collect) and watch again to form a good habit
RocketMQ tutorial related series directory
catalogue
Section I: server preparation
Section 2: installing RocketMQ
Create rocketmq storage directory
Modify runbroker sh
Modify runserver sh
Section III: Configuration ...
Posted by dudejma on Sat, 19 Feb 2022 21:16:26 +0100
Sequential consumption of RocketMQ MessageListenerOrderly()
consumer.registerMessageListener(new MessageListenerOrderly() {
@Override
public ConsumeOrderlyStatus consumeMessage(List<MessageExt> msgs, ConsumeOrderlyContext context) {
for (MessageExt msg : msgs) {
System.out.println(new String(msg.getBody())+" Thread:"+Thread.currentThread( ...
Posted by gvanaco on Thu, 17 Feb 2022 07:29:29 +0100
Implementation of rocketmq distributed transaction
1. Transaction scenario
Scenario: ICBC user A transfers 10000 yuan to CCB user B; Steps:
1. ICBC system sends a synchronization message M to Broker, which increases the payment of RMB 10000 to B2. After the message is successfully received by the Broker, send a successful ACK to the ICBC system3. ICBC system will deduct 10000 yuan from u ...
Posted by Blockis on Fri, 11 Feb 2022 12:45:16 +0100
RocketMQ Dual Primary Double Slave Cluster Setup
1 Introduction to roles
Producer: The sender of the message; Example: SenderConsumer: Message recipient; Example: RecipientBroker: Stay and transfer messages; Example: Post OfficeNameServer: Manage Broker; Examples: the administrative bodies of various post officesTopic: Differentiate the types of messages; One sender can send a message to one ...
Posted by somedude on Thu, 10 Feb 2022 10:14:19 +0100
Rocketmqlrocketmq message consumption retry mechanism
1. Retry of sequential messages
For sequential messages, when the consumer fails to consume the message, the message queue RocketMQ will automatically retry the message continuously (with an interval of 1 second). At this time, the application will be blocked in message consumption. Therefore, when using sequential messages, it is important to ...
Posted by baffled_in_UK on Thu, 10 Feb 2022 03:10:43 +0100
RocketMQ learning 13 - sequential messages, delayed messages and message filtering
As shown in the title, this paper focuses on sequential messages, delayed messages and message filtering.1, Sequential messageRocketMQ can only ensure the order of messages at the queue level. If you want to realize the sequential execution of a certain type of messages, you must send such messages to the same queue. You can use MessageQueueSel ...
Posted by nemethpeter on Tue, 08 Feb 2022 15:21:17 +0100
RocketMQ learning 12 - Message disk brushing
For data storage, RocketMQ uses the file programming model. In order to improve the writing performance of files, the memory mapping mechanism is usually introduced. The data is written to the page cache first, and then the page cache data is flushed to the disk. The performance and data reliability involved in writing must be considered. For t ...
Posted by cocell on Mon, 07 Feb 2022 10:06:26 +0100
RocketMQ learning 10 - message storage
The above is a picture found on the official website. After the producer sends the message, the broker generates the commitlog and ConsumerQueue files, and then the consumer obtains the message according to the starting physical address + message size in the commitlog in the ConsumerQueue, and then obtains the message for consumption.The follow ...
Posted by Tjeuten on Sun, 06 Feb 2022 09:22:36 +0100