Skip to content

Commit

Permalink
[FIX_KAFKA_EXECUTOR] fix executor service (#3033) (#3035)
Browse files Browse the repository at this point in the history
Co-authored-by: Enrique <egonzale@redhat.com>
  • Loading branch information
github-actions[bot] and elguardian authored Mar 26, 2024
1 parent f8e4d70 commit babb3f0
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 babb3f0

Please sign in to comment.