Cách tạo delay exchange

https://www.rabbitmq.com/blog/2015/04/16/scheduling-messages-with-rabbitmq

Step 1: 

Installing the Plugin

To install the plugin go to our Community Plugins page and download the corresponding .ez files for your RabbitMQ installation. Copy the plugin into RabbitMQ's plugin folder and then enable it by running the following command:

rabbitmq-plugins enable rabbitmq_delayed_message_exchange


Step 2: Tạo exchange
Type : x-delayed-message
args: ("x-delayed-type", "direct");


Step 3: Send Message 
headers.put("x-delay", 5000);   <=>  5000 ms or 5 seconds




Comments

Popular posts from this blog

Fixing the DeepSpeed Import Error While Fine-Tuning the Qwen Model

Amazon Linux 2023 - User data configuration for launch templates to connect to the EKS cluster

How to create ISM policy and rotate logs in opensearch