Aias00 opened a new issue, #6885:
URL: https://github.com/apache/shenyu/issues/6885

   ## Description
   `initClient0` registers `Runtime.getRuntime().addShutdownHook(new 
Thread(this::close))` in addition to the base-class hook tracked/removed by 
`AbstractLogConsumeClient`. On every reconfig, only the base-class hook is 
removed; the RocketMQ-added hook is never removed and accumulates. At JVM 
shutdown `close()` is invoked once per leaked hook.
   
   ## Location
   - 
`shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-rocketmq/src/main/java/org/apache/shenyu/plugin/logging/rocketmq/client/RocketMQLogCollectClient.java:83`
   
   ## Impact
   Shutdown-hook leak across config refreshes; `close0` (`producer.shutdown()`) 
called multiple times at shutdown; hook threads accumulate.
   
   ## Suggested fix
   Remove the extra `addShutdownHook`; rely on the base-class tracked hook, or 
track/remove this hook in `close0`.
   
   ## Related existing
   Distinct from #6768 (Pulsar shutdown-hook, LOG-11) — same pattern, different 
file.
   


-- 
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]

Reply via email to