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 […]
Tag: confirm
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 […]
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 […]