elephone-184 opened a new pull request, #5138: URL: https://github.com/apache/rocketmq-dashboard/pull/5138
## What is the purpose of the change In RocketMQ client architecture, producer availability depends heavily on proper client deployment practices (e.g. multi-host network redundancy, non-loopback IP socket bindings, and modern SDK remoting protocol compliance). When applications deploy all producer instances onto a single host IP or run legacy 3.x/4.x SDKs, hardware failures cause complete message ingestion outages. This PR introduces an automated `ProducerConnectionHealthAnalyzer`: 1. `ProducerHealthAuditReportVO` & `ProducerClientRiskVO`: Structured domain models reporting total producer connections, multi-host IP redundancy status, client language breakdown (Java, Go, C++, Python, Rust), and specific client-level risk items (`OUTDATED_SDK_VERSION`, `LOOPBACK_BINDING`, `UNRECOGNIZED_LANGUAGE`). 2. `ProducerConnectionHealthAnalyzer`: Inspects live `ProducerConnectionVO` client addresses, language identifiers, and version descriptors scanned from broker cluster endpoints. It detects single-host availability risks, flags loopback registrations (e.g. `127.0.0.1`), highlights legacy SDK versions, and surfaces actionable deployment recommendations. 3. Controller & Service wiring: Integrates through `ProducerConnectionService.auditProducerHealth` and exposes `/api/producer/health-audit` in `ProducerController`. 4. Comprehensive unit test suite covering single-host warnings, multi-host healthy pools, legacy SDK detection, loopback bindings, unrecognized languages, and controller/service integration. ## Brief changelog - Add `ProducerHealthAuditReportVO.java` domain model. - Add `ProducerConnectionHealthAnalyzer.java` connection audit engine. - Add `auditProducerHealth` in `ProducerConnectionService`. - Expose `/api/producer/health-audit` endpoint in `ProducerController`. - Add `ProducerConnectionHealthAnalyzerTest.java` and expand `ProducerConnectionServiceTest.java` and `ProducerControllerTest.java`. ## Verifying this change - `ProducerConnectionHealthAnalyzerTest`: verifies empty connection handling, single-host warnings, multi-host healthy classification, legacy version detection, and loopback socket alerts. - `ProducerConnectionServiceTest`: verifies producer scanning and health analyzer delegation. - `ProducerControllerTest`: verifies `/api/producer/health-audit` REST endpoint serialization. -- 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]
