mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-21 02:25:56 +08:00
监听消息后先获取一下队列,防止服务重启后没有入队列的数据时之前的消息卡住
This commit is contained in:
parent
cc326e36cc
commit
07b6ced6a5
@ -227,6 +227,7 @@ public class QueueUtils {
|
|||||||
public static <T> void subscribeBlockingQueue(String queueName, Consumer<T> consumer) {
|
public static <T> void subscribeBlockingQueue(String queueName, Consumer<T> consumer) {
|
||||||
RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName);
|
RBlockingQueue<T> queue = CLIENT.getBlockingQueue(queueName);
|
||||||
queue.subscribeOnElements(consumer);
|
queue.subscribeOnElements(consumer);
|
||||||
|
CLIENT.getDelayedQueue(queue);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user