diff --git a/pulsar-jms-filters/src/main/java/com/datastax/oss/pulsar/jms/selectors/JMSPublishFilters.java b/pulsar-jms-filters/src/main/java/com/datastax/oss/pulsar/jms/selectors/JMSPublishFilters.java index 9de71369..6a65b2f1 100644 --- a/pulsar-jms-filters/src/main/java/com/datastax/oss/pulsar/jms/selectors/JMSPublishFilters.java +++ b/pulsar-jms-filters/src/main/java/com/datastax/oss/pulsar/jms/selectors/JMSPublishFilters.java @@ -592,7 +592,12 @@ public void close() { log.info("Broker is shutting down. Disabling JMSPublishFilters interceptor"); closed.set(true); filter.close(); - executor.shutdown(); + if (executor != null) { + executor.shutdown(); + } + if (drainAckQueueExecutor != null) { + drainAckQueueExecutor.shutdown(); + } } @Override