mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 21:18:58 +00:00
(mq) Down-tune polling intervals in MQ
Polling 10 times a second across dozens of queues is a bit too aggressive and wasteful.
This commit is contained in:
parent
c7f0276005
commit
fca62f261e
@ -27,7 +27,7 @@ public class MqAsynchronousInbox implements MqInboxIf {
|
||||
|
||||
private volatile boolean run = true;
|
||||
|
||||
private final int pollIntervalMs = Integer.getInteger("mq.inbox.poll-interval-ms", 100);
|
||||
private final int pollIntervalMs = Integer.getInteger("mq.inbox.poll-interval-ms", 1000);
|
||||
private final int maxPollCount = Integer.getInteger("mq.inbox.max-poll-count", 10);
|
||||
private final List<MqSubscription> eventSubscribers = new ArrayList<>();
|
||||
private final LinkedBlockingQueue<MqMessage> queue = new LinkedBlockingQueue<>(32);
|
||||
|
@ -24,7 +24,7 @@ public class MqSynchronousInbox implements MqInboxIf {
|
||||
|
||||
private volatile boolean run = true;
|
||||
|
||||
private final int pollIntervalMs = Integer.getInteger("mq.inbox.poll-interval-ms", 100);
|
||||
private final int pollIntervalMs = Integer.getInteger("mq.inbox.poll-interval-ms", 1000);
|
||||
private final List<MqSubscription> eventSubscribers = new ArrayList<>();
|
||||
|
||||
private Thread pollDbThread;
|
||||
|
@ -22,7 +22,7 @@ public class MqOutbox {
|
||||
|
||||
private final ConcurrentHashMap<Long, MqMessage> pendingResponses = new ConcurrentHashMap<>();
|
||||
|
||||
private final int pollIntervalMs = Integer.getInteger("mq.outbox.poll-interval-ms", 100);
|
||||
private final int pollIntervalMs = Integer.getInteger("mq.outbox.poll-interval-ms", 1000);
|
||||
private final int maxPollCount = Integer.getInteger("mq.outbox.max-poll-count", 10);
|
||||
private final Thread pollThread;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user