Skip to content

Commit

Permalink
[FIX_KAFKA_EXECUTOR] fix executor service
Browse files Browse the repository at this point in the history
  • Loading branch information
elguardian committed Feb 29, 2024
1 parent 5dad97a commit 550927d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
Expand Down Expand Up @@ -112,10 +113,7 @@ private void registrationUpdated(Set<String> topics2Register, boolean shouldInit
consumer = consumerSupplier.get();
consumer.subscribe(topics2Register);
logger.debug("Created kafka consumer with these topics registered {}", topics2Register);
notifyService.set(
new ThreadPoolExecutor(1, Integer.getInteger(KAFKA_EXTENSION_PREFIX + "maxNotifyThreads", 10),
60L,
TimeUnit.SECONDS, new LinkedBlockingQueue<>()));
notifyService.set(Executors.newFixedThreadPool(Integer.getInteger(KAFKA_EXTENSION_PREFIX + "maxNotifyThreads", 10)));
new Thread(this).start();
}
} else {
Expand Down

0 comments on commit 550927d

Please sign in to comment.