diff --git a/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/devmode/ReactiveMessagingHotReplacementSetup.java b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/devmode/ReactiveMessagingHotReplacementSetup.java index da735642fa556..de341cfefb784 100644 --- a/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/devmode/ReactiveMessagingHotReplacementSetup.java +++ b/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/devmode/ReactiveMessagingHotReplacementSetup.java @@ -1,7 +1,7 @@ package io.quarkus.smallrye.reactivemessaging.runtime.devmode; import java.util.concurrent.CompletableFuture; -import java.util.concurrent.Executor; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.function.Supplier; @@ -17,7 +17,7 @@ public class ReactiveMessagingHotReplacementSetup implements HotReplacementSetup private HotReplacementContext context; private volatile long nextUpdate; - private final Executor executor = Executors.newSingleThreadExecutor(); + private final ExecutorService executor = Executors.newSingleThreadExecutor(); @Override public void setupHotDeployment(HotReplacementContext context) { @@ -25,6 +25,11 @@ public void setupHotDeployment(HotReplacementContext context) { DevModeSupportConnectorFactoryInterceptor.register(new OnMessage()); } + @Override + public void close() { + executor.shutdown(); + } + private class OnMessage implements Supplier> { @Override public CompletableFuture get() {