diff --git a/folkmq/src/main/java/org/noear/folkmq/server/MqQueueDefault.java b/folkmq/src/main/java/org/noear/folkmq/server/MqQueueDefault.java index f413793b..03bd23b4 100644 --- a/folkmq/src/main/java/org/noear/folkmq/server/MqQueueDefault.java +++ b/folkmq/src/main/java/org/noear/folkmq/server/MqQueueDefault.java @@ -192,7 +192,7 @@ protected void distribute0(MqMessageHolder messageHolder) { return; } - if(messageHolder.getExpiration() > 0 && messageHolder.getExpiration() > System.currentTimeMillis()){ + if(messageHolder.getExpiration() > 0 && messageHolder.getExpiration() < System.currentTimeMillis()){ //已过期 messageMap.remove(messageHolder.getTid()); return;