1. Environment preparation Note: Ignore if related tools have already been installed. 1Install JAVA operating environment Step 1: Upload or download the installation package cd /usr/local jdk-8u152-linux-x64.tar.gz Step 2: Unzip the installation package tar -zxvf jdk-8u152-linux-x64.tar.gz Step 3: Establish a soft connection ln -s /usr/local/jdk1.8.0_152/ /usr/local/jdk Step 4: Modify environment variables vim /etc/profile export JAVA_HOME=/usr/local/jdk […]
Tag: rabbitmq
The role of configuration configuration class, rabbitMq code example how to customize beans
@Configuration @ConditionalOnClass(SimpleRabbitListenerContainerFactory.class) public class ConsumerConfig { @Value(“${rabbit.batch.num:100}”) private int batchNum; @Bean(“batchQueueRabbitListenerContainerFactory”) public SimpleRabbitListenerContainerFactory batchQueueRabbitListenerContainerFactory(ConnectionFactory connectionFactory) { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); factory.setConnectionFactory(connectionFactory); factory.setBatchListener(true); factory.setConsumerBatchEnabled(true); factory.setBatchSize(batchNum); return factory; } } This code is a RabbitMQ message consumer configuration class based on Spring Boot. Let me explain step by step and give examples: @Configuration: This annotation indicates […]
RabbitMQ cluster deployment
Table of Contents 1.Environment preparation 1.1 Turn off the firewall and selinux 1.2 Local analysis 1.3 Install rabbitmq software 1.4 Start the service 1.5Create user 1.6 Enable user remote login 2. Start deploying the cluster (operate on all three machines) 2.1 First create the data storage directory and log storage directory 2.2 Copy erlang.cookie 2.3 […]
RabbitMQ related deployment
1. Common cluster preparation environment Note that these three servers are all connected, and the RabbitMQ cluster nodes must be in the same segment. If they are connected across domains, the effect will be worse. 10.36.192.150 rabbitmq-1 10.36.192.151 rabbitmq-2 10.36.192.152 rabbitmq-3 All three servers have their firewalls and selinux turned off [root@rabbitmq-1 ~]#systemctl stop firewalld […]
5.RabbitMQ release confirmation advanced
5 Release Confirmation Advanced Due to some unknown reasons in the production environment, rabbitMQ restarted. During the restart of RabbitMQ, the producer failed to deliver messages, resulting in message loss, which required manual processing and reply. So we tried to think about how to achieve reliable delivery of RabbitMQ. Especially in extreme situations. When the […]
Construction and deployment of rabbitmq cluster
Preparation: Three clean servers 192.168.52.156 192.168.52.157 192.168.52.158 These three servers are all connected, and the RabbitMQ cluster nodes must be on the same segment. If they are connected across domains, the effect will be worse. Turn off firewall and selinux 1. Install and deploy rabbitmq on three machines Install dependencies [root@rabbitmq-1 ~]# yum install -y […]
RabbitMQ cluster configuration and load balancing configuration
RabbitMQ cluster configuration and load balancing configuration Environment configuration Cluster configuration Install rabbitmq Start rabbitmq Enable remote login Add users and authorize users Add data storage directory and log storage directory View port copy?erlang.cookie Add mq-2 and mq-3 as memory nodes to the mq-1 node cluster View cluster status Add a new queue RabbitMq load […]