限定本地队列容量上限

This commit is contained in:
三丙
2024-10-16 10:57:47 +08:00
parent a90c94a40c
commit 74eeb256e2

View File

@@ -39,7 +39,7 @@ public final class DefaultInMemoryStorage implements InMemoryStorage {
@Override
public boolean put(String topic, QueueMsg msg) {
return storage.computeIfAbsent(topic, (t) -> new LinkedBlockingQueue<>()).add(msg);
return storage.computeIfAbsent(topic, t -> new LinkedBlockingQueue<>(100000)).add(msg);
}
@Override