Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n committed Aug 16, 2024
1 parent 6db29b5 commit 406b298
Showing 1 changed file with 6 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
*/
package io.orkes.conductor.mq.redis;

import com.google.common.util.concurrent.Uninterruptibles;
import io.orkes.conductor.mq.QueueMessage;
import lombok.extern.slf4j.Slf4j;

import java.math.BigDecimal;
import java.time.Clock;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.*;

import io.orkes.conductor.mq.QueueMessage;

import com.google.common.util.concurrent.Uninterruptibles;
import lombok.extern.slf4j.Slf4j;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;

@Slf4j
public abstract class QueueMonitor {
Expand All @@ -32,8 +32,6 @@ public abstract class QueueMonitor {

private final LinkedBlockingQueue<QueueMessage> peekedMessages;

private final ExecutorService executorService;

private final String queueName;

private int queueUnackTime = 30_000;
Expand All @@ -54,9 +52,6 @@ public QueueMonitor(String queueName) {
this.queueName = queueName;
this.clock = Clock.systemDefaultZone();
this.peekedMessages = new LinkedBlockingQueue<>();
this.executorService =
new ThreadPoolExecutor(
1, 1, 0L, TimeUnit.MILLISECONDS, new ArrayBlockingQueue<>(getMaxPollCount()));
}

public List<QueueMessage> pop(int count, int waitTime, TimeUnit timeUnit) {
Expand Down

0 comments on commit 406b298

Please sign in to comment.