Golang integrates RocketMQ

RocketMQ related knowledge summary What is RocketMQ RocketMQ is an open source MQ framework from Alibaba. It is widely used in different business scenarios and has very good ecosystem support. It supports transaction messages, sequential messages, batch messages, scheduled messages, message traceback and other functions. RocketMQ core concepts Name Service (NameServer): It can be understood […]

How to handle rocketMq message accumulation

Message accumulation is common in the following situations: (1) The newly launched consumer function has a bug and messages cannot be consumed. (2) The consumer instance is down or temporarily unable to establish a connection with the Broker due to network problems. (3) Producers push a large number of messages to Broker in a short […]

docker+rocketmq 5.1.3 stand-alone and 2m-2s asynchronous cluster deployment

rocketmq container deployment instructions Note: This document rocketmq containerized deployment method Image name Image name tag Remarks chtsen/rocketmq 5.1.3_uuid dockerhub Port description Application Port Description namesrv 9876 broker 10909, 10911, 10912 console 1666 Environment variables Note: The variables marked in red are required Environment variables Description Default value NAMESRV_SVC namesrv routing service, single-machine configuration: 192.168.100.100:9876 […]

Sprint Cloud Stream integrates RocketMq and websocket to implement message publishing and subscription

1.Introduce RocketMQ dependencies: First, add RocketMQ dependencies in the pom.xml file: <dependency> <groupId>org.apache.rocketmq</groupId> <artifactId>rocketmq-spring-boot-starter</artifactId> <version>2.2.0</version> <!– The version number is adjusted according to the actual situation –> </dependency> 2.Configure RocketMQ connection information: Configure RocketMQ connection information in application.properties or application.yml, including Name Server address, etc.: spring: application: name: ${sn.publish} cloud: stream: rocketmq: binder: name-server: ${rocket-mq.name-server} […]

RocketMQ active and standby automatic switching mode deployment

RocketMQActive and backup automatic switching mode deployment In this mode, one node will be elected as the Master node, and the remaining nodes will be Slave nodes. Environment preparation Machine Description 192.168.232.138 (Machine A) NameServer, Controller, Broker 192.168.232.139 (Machine B) NameServer, Controller, Broker 192.168.232.140 (Machine C) NameServer , Controller, Broker 192.168.232.141 (machine D) Broker NameServerDeployment […]

Will the RocketMQ transaction message still be the original message after timeout?

Let’s analyze the following demo example to explore the principles of RocketMQ transaction messages. public static final String PRODUCER_GROUP = “tran-test”; public static final String DEFAULT_NAMESRVADDR = “127.0.0.1:9876”; public static final String TOPIC = “Test”; public static void main(String[] args) throws Exception { TransactionListener transactionListener = new TransactionListener() { @Override public LocalTransactionState executeLocalTransaction(Message msg, Object […]

Differences and choices between Spring Cloud Stream and SpringBoot integrating RocketMq

Concept overview Spring Boot integrating RocketMQ and Spring Cloud Stream integrating RocketMQ are two different methods. They have some key differences when using RocketMQ message queue: Spring Boot integrates RocketMQ: Spring Boot’s integration of RocketMQ usually directly integrates the RocketMQ client SDK to use RocketMQ in Spring Boot applications. You need to configure RocketMQ’s producers […]

Windows installs RocketMQ to send messages regularly at any time

System environment System: window 10 JDK: java version “11.0.21” ROCKETMQ: rocketmq-all-5.1.4-bin-release Installation steps rocketMq download address official website: http://rocketmq.apache.org/dowloading/releases/ Unzip the configuration environment variables, manually add the environment variable named ROCKETMQ_HOME, and index to the RocketMQ decompression directory 3.JDK11, you need to modify some configurations to start RocketMQ, modify %ROCKETMQ_HOME%/bin/runserver.cmd @echo off rem Licensed to […]

Will the RocketMQ transaction message still be the original message after timeout?

Let’s analyze the following demo example to explore the principles of RocketMQ transaction messages. public static final String PRODUCER_GROUP = “tran-test”; public static final String DEFAULT_NAMESRVADDR = “127.0.0.1:9876”; public static final String TOPIC = “Test”; public static void main(String[] args) throws Exception {<!– –> TransactionListener transactionListener = new TransactionListener() {<!– –> @Override public LocalTransactionState executeLocalTransaction(Message […]