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 […]

RabbitMQ enables message sending confirmation and consumption manual confirmation

The producer who turns on RabbitMQ sends a message receipt confirmation (ACK) to the RabbitMQ server and the consumer manually acknowledges or discards the consumed message. Enable producer confirmation messages by configuring publisher-confirm-type: correlated and publisher-returns: true. server: port: 8014 spring: rabbitmq: username:admin password: 123456 dynamic: true # port: 5672 # host: 192.168.49.9 addresses: 192.168.49.10:5672,192.168.49.9:5672,192.168.49.11:5672 […]

RabbitMQ release confirmation advanced

RabbitMQ Release Confirmation Advanced 1. Release and confirm SpringBoot version 1.1 Confirmation mechanism plan 1.2 Code architecture diagram 1.3 Configuration file 1.4 Add configuration class 1.5 Message producer 1.6 Callback interface 1.7 Message Consumer 1.8 Result analysis 2. Rollback message 2.1 Mandatory parameters 2.2 Message producer code 2.3 Callback interface 2.4 Result analysis 3. Backup […]

MQ Advanced-Message Confirmation

Business card: Blogger: Alcoholic?. Personal profile: Indulge in wine, and use the energy of wine to fight for a future. This article is inspirational: When three people are together, there must be one who is my teacher. This project is based on Bilibili’sDark Horse Programmer Java’s “SpringCloud Microservice Technology Stack”, SpringCloud + RabbitMQ + Docker […]

rabbitmq message confirmation based on springboot

Directory Overview step 1. Introduce rabbitmq package 2. yml configuration file 3. Message ConverterConfig 4. Message sending confirmation 5. Configuration class (define exchange and queue, and bind queue to exchange) 6. Message sender 7. Message consumers 8. Test method 9. Supplement Overview There are two types of message confirmation in RabbitMQ. One is message sending […]

Read, write, and confirm Excel documents using Java

This article introduces through examples how Java and the Apache POI library process XLSX files, helping you automate Excel-related tasks and effectively process data in Java applications. Search on WeChat and follow “Java Learning and Research Base Camp” 1 Introduction In today’s data-driven world, programmatic processing of Excel files is crucial. Java provides powerful libraries […]

RabbitMQ’s Confirm mechanism

1. Reliability of messages RabbitMQ provides a confirmation mechanism for Confirm. The Confirm mechanism is used to confirm whether the message has been sent to the switch. 2.Java implementation 1. Import dependencies <dependency> <groupId>com.rabbitmq</groupId> <artifactId>amqp-client</artifactId> <version>5.6.0</version> </dependency> 2. Producer of Confirm mechanism package com.qf.mq2302.hello; import com.qf.mq2302.utils.MQUtils; import com.rabbitmq.client.Channel; import com.rabbitmq.client.Connection; public class Send { //Declare […]

Only one ConfirmCallback is supported by each RabbitTemplate

When SpringBoot integrates Rabbitmq, we enable the manual confirmation mode of the message publisher and configure it as follows: # Message middleware spring: rabbitmq: host: 127.0.0.1 port: 5672 username: guest password: guest #Message producer confirmation mode publisher-confirm-type: correlated #Message producer callback is enabled publisher-returns: true After the above configuration is enabled, we need to manually […]