RockteMQ-AI commented on issue #11427: URL: https://github.com/apache/rocketmq/issues/11427#issuecomment-6153082017
**Issue Evaluation** Category: `type/bug` | Status: **Confirmed** The reported issue has been verified against the current codebase on branch `develop`. **Root Cause:** `DefaultMQPushConsumerImpl.start()` starts both `consumeMessageService` and `consumeMessagePopService` (lines 984-986), but `shutdown()` only stops `consumeMessageService` (line 908). `consumeMessagePopService.shutdown()` is never called anywhere in the codebase. `ConsumeMessagePopOrderlyService.start()` schedules `lockMQPeriodically()` on a non-daemon thread created by `ThreadFactoryImpl` (daemon=false by default). Since `shutdown()` is never invoked, this thread runs indefinitely, preventing JVM exit. **Impact:** Every `DefaultMQPushConsumer` in CLUSTERING mode (the default) leaks `ConsumeMessageScheduledThread_1`. This non-daemon thread alone prevents the JVM from exiting after `consumer.shutdown()`, requiring explicit `System.exit()`. The same omission exists in the failed-start branch (lines 991-993). **Severity:** High — silent resource leak affecting every consumer shutdown; no workaround except `System.exit`. **Fix:** Two one-line additions: 1. Add `this.consumeMessagePopService.shutdown(awaitTerminateMillis);` after line 908 in `shutdown()` 2. Add the same call after line 991 in the failed-start branch An automated fix proposal will be generated. Reply `/approve` to proceed with PR generation. --- *Automated evaluation by github-manager-bot* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
