1. Introduction
A delay queue is a special type of queue that allows messages or tasks to be processed after a specified time interval, and has significant application value in many business scenarios. For example, in e-commerce scenarios, if a user does not complete payment within a specified time after creating an order, the system can automatically cancel the order. In distributed systems, delay queues can also be used for scheduled task scheduling, such as cleaning log files daily, automatically backing up data weekly, etc.
Pulsar's delayed message feature allows producers to specify a delay time, and the broker will distribute the message to consumers only after a period of time, rather than immediately after the message is published.
It should be noted that if you want the consumer to specify the delay time, i.e., consumer-side delay queue functionality, then Pulsar's Negative Acknowledge or retry queue features can be used to fulfill this, which will be introduced in later articles.
The delay queue mentioned below specifically refers to the production-side delay queue. Most message queue middleware also refers to production-side delay queues when introducing delay queues.
Last updated
Was this helpful?

