Aias00 opened a new issue, #6846: URL: https://github.com/apache/shenyu/issues/6846
## Description `AbstractLogConsumeClient` does `this.initClient0(config); isStarted.set(true);` — unconditionally sets `started` after `initClient0` returns, even though `initClient0` returns early on invalid config without creating the underlying producer/channel. `consume` only guards `!isStarted.get()`; since `isStarted` was set true despite the failed init, `consume0` runs against a null producer/channel. ## Location - `shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-common/src/main/java/org/apache/shenyu/plugin/logging/common/client/AbstractLogConsumeClient.java:75-76` - `KafkaLogCollectClient.java:69-72` → NPE at `:128`; `RocketMQLogCollectClient.java:71-74` → `:114`; `PulsarLogCollectClient.java:58-61` → `:75`; `TencentClsLogCollectClient.java:74-77` → `:136`; `RabbitmqLogCollectClient.java:55-62` → `:95` ## Impact After a bad/expired config refresh or transient broker failure at init time, every subsequent log batch throws inside `consume0`; clients log spam "push logs error" forever while dropping 100% of logs and never self-recover. ## Suggested fix Set `isStarted.set(true)` only on successful `initClient0` (return a boolean / throw on failure); guard `consume0` against null producer/channel. ## Related existing Distinct from LOG-15 (AliyunSLS NPE if producer is null but client is non-null) — this covers the Kafka/RocketMQ/Pulsar/Tencent/RabbitMQ instances of the same root cause. -- 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]
