RockteMQ-AI commented on issue #11427:
URL: https://github.com/apache/rocketmq/issues/11427#issuecomment-6153111900
**Fix Spec — v1**
## Summary
`DefaultMQPushConsumerImpl.shutdown()` never shuts down
`consumeMessagePopService`, so the pop consume service's non-daemon threads
keep the JVM alive after consumer shutdown.
## Fix Plan
**File:** `client/.../DefaultMQPushConsumerImpl.java`
**Change 1** — `shutdown(long)`, RUNNING branch: add
`this.consumeMessagePopService.shutdown(awaitTerminateMillis);` immediately
after line 908 (`consumeMessageService.shutdown()`).
**Change 2** — `start()`, failed `registerConsumer` branch: add
`this.consumeMessagePopService.shutdown(defaultMQPushConsumer.getAwaitTerminationMillisWhenShutdown());`
after the existing `consumeMessageService.shutdown()` call.
## Risk
Low — only adds shutdown calls, no API changes. Pop service shutdown is
idempotent. Ordering is safe (pop `unlockAll` runs before
`rebalanceImpl.destroy()`).
## Test Plan
- Unit test: verify pop threads are terminated after `shutdown()`
- Manual: JVM exits cleanly after `consumer.shutdown()` without
`System.exit()`
- Regression: `mvn -pl client test`
---
Reply `/approve` to proceed with PR generation, `/revise <feedback>` to
request changes, or `/reject` to decline.
*Automated spec by ${BOT_SIG}*
--
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]