(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:
Viktor Lofgren 2023-08-22 11:49:30 +02:00
parent c7f0276005
commit fca62f261e
3 changed files with 3 additions and 3 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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;