Caideyipi opened a new pull request, #18259: URL: https://github.com/apache/iotdb/pull/18259
## Description ### Problem The Eclipse Milo client discovers endpoints from the configured OPC UA server and then connects to the endpoint URL advertised by the server. If the advertised hostname differs from `node-url` and resolves to another machine, Pipe can silently send data to the wrong OPC UA server. ### Behavior - Add `connector.opcua.allow-endpoint-redirect` and its `sink.opcua.allow-endpoint-redirect` alias. - Keep endpoint redirects disabled by default: use the host and port from the configured `node-url`, while preserving the advertised endpoint path, security settings, certificate, and token policies. - When the option is `true`, preserve Milo's existing behavior and use the complete advertised endpoint URL. - Match the configured URL scheme and transport profile before selecting an endpoint. - Log the configured, advertised, and effective endpoint URLs. - Include the option in shared OPC UA client conflict detection. ### Tests - `ClientRunnerTest`: configured host/port override, opt-in redirect, scheme/transport selection, and shared-client conflict detection. - `mvn spotless:apply -pl iotdb-core/node-commons,iotdb-core/datanode -DskipTests` - targeted `ClientRunnerTest`: 4 tests, 0 failures - `mvn -DskipTests test-compile` - `mvn -DskipTests -P with-zh-locale test-compile` <hr> This PR has: - [x] been self-reviewed. - [x] added comments explaining the why and intent where the behavior is not obvious. - [x] added unit tests to cover the new code paths. <hr> ##### Key changed/added classes (or packages if there are too many classes) in this PR - `OpcUaSink` - `ClientRunner` - `ClientRunnerTest` -- 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]
