SpringBoot AOP + Redis delayed double deletion function in practice

<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-aop</artifactId> </dependency> /** *Delayed double deletion **/ @Retention(RetentionPolicy.RUNTIME) @Documented @Target(ElementType.METHOD) public @interface ClearAndReloadCache {<!– –> String name() default “”; } @Aspect @Component public class ClearAndReloadCacheAspect {<!– –> @Autowired private StringRedisTemplate stringRedisTemplate; /** * entry point *Entry point, entry point implemented based on annotations. Those with this annotation are all […]

Centos installs RabbitMQ, JavaSpring sends RabbitMQ delayed messages, and JavaSpring consumes RabbitMQ messages

1, Release Notes erlang and rabbitmq release notes https://www.rabbitmq.com/which-erlang.html Confirm the mq version that needs to be installed and the corresponding erlang version. 2, download the installation file RabbitMQ download address: https://packagecloud.io/rabbitmq/rabbitmq-server Erlang download address: https://packagecloud.io/rabbitmq/erlang RabbitMQ delayed message plug-in download https://github.com/rabbitmq/rabbitmq-delayed-message-exchange/releases Download the file as shown in the figure 3, installation steps 3.1. Check […]

A brief discussion on RabbitMQ’s delay queue

Part 01. What is the delay queue The delay queue represents a powerful messaging mechanism that allows us to specify that when we send messages to RabbitMQ, they can only be consumed at a predetermined time point in the future. This special type of message is simply called a “delayed message”. Taking RabbitMQ as an […]

FPGA design timing constraints 6. Set maximum/minimum delay

Table of Contents 1. Background 2. Max/Min_delay constraints 2.1 Constraint setting parameters 2.2 Constraint description 3. Project examples 3.1 Engineering code 3.2 Timing report 4. Reference materials 1. Background In the design, sometimes it is necessary to limit the maximum delay and minimum delay of the path, such as asynchronous signals without specific clock relationships, […]

RabbitMq uses TTL + dead letter queue to implement delayed message queue, pure annotation style

Table of Contents 1 Introduction 2. Overview of TTL 3. Introduction to the dead letter queue 4. Why do we need to delay the message queue? 5. Introduction to RabbitMQ annotations 6. Implement delayed message queue using pure annotations 7. Sample code Define a normal business switch and queue, but do not enable this consumer […]

PostgreSQL trigger monitors whether there is a delay in table data falling time

PostgreSQL trigger monitors whether there is a delay in table data falling into the table scene description 1. Create a large account (etl_tzq) to monitor the table (tzq_log_t) data of the ordinary account (tzq). 2. Create monitoring data table: tzq_monitor_data_t 3. Create a trigger function: tzq_change_data_trigger() 4. Create a trigger: tri_data_tzq_log_t to monitor the addition, […]

Orders are automatically closed after delay, and five solutions are available to handle it elegantly!

Foreword During development, we often encounter some requirements for delayed tasks. For example If the order is not paid within 30 minutes, it will be automatically canceled. 60 seconds after generating the order, send a text message to the user For the above tasks, we give a professional name to describe them, that is, delayed […]

RabbitMQ (5) Delayed Message

Delayed message: The producer specifies a time when sending a message. The consumer will not receive the message immediately, but after the specified time.Delayed tasks: Set tasks to be executed after a certain period of time There are two implementations of delayed messages: dead letter switches and delayed message plug-ins. 1. Dead letter switch When […]