-
Notifications
You must be signed in to change notification settings - Fork 37
More finegrained configuration and handling of TLS and reconnection features. #1254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
7146b85 to
a22f84d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some questions.
hivemq-edge/src/main/java/com/hivemq/protocols/ProtocolAdapterManager.java
Outdated
Show resolved
Hide resolved
...mq-edge-module-opcua/src/main/java/com/hivemq/edge/adapters/opcua/OpcUaClientConnection.java
Show resolved
Hide resolved
...mq-edge-module-opcua/src/main/java/com/hivemq/edge/adapters/opcua/OpcUaClientConnection.java
Show resolved
Hide resolved
...mq-edge-module-opcua/src/main/java/com/hivemq/edge/adapters/opcua/OpcUaClientConnection.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances the OPC UA adapter with configurable connection timeouts, automatic reconnection, health monitoring, and TLS certificate validation controls. The changes improve connection reliability and provide better control over certificate validation behavior.
- Added
ConnectionOptionsfor configurable timeouts (session, request, keep-alive, connection, health check, retry) and automatic reconnection - Introduced
TlsChecksenum to control certificate validation levels (NONE, STANDARD, ALL) - Implemented health monitoring with automatic reconnection on connection failures
- Added connection retry logic with configurable intervals
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| ConnectionOptions.java | New configuration class for connection timeout and retry settings |
| TlsChecks.java | New enum defining certificate validation levels |
| Tls.java | Added tlsChecks field and default factory method |
| OpcUaSpecificAdapterConfig.java | Added connectionOptions field and updated defaults |
| BidirectionalOpcUaSpecificAdapterConfig.java | Updated constructor to pass connectionOptions |
| OpcUaProtocolAdapter.java | Implemented health monitoring, reconnection logic, and retry scheduling |
| OpcUaClientConnection.java | Added connection timeout and health check functionality |
| OpcUaClientConfigurator.java | Applied timeout configurations from ConnectionOptions |
| ParsedConfig.java | Added TLS validation check selection based on TlsChecks |
| OpcUaSubscriptionLifecycleHandler.java | Added keep-alive health monitoring |
| Test files | Updated to accommodate new constructor parameters and configuration fields |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...edge-module-opcua/src/main/java/com/hivemq/edge/adapters/opcua/config/ConnectionOptions.java
Outdated
Show resolved
Hide resolved
...edge-module-opcua/src/main/java/com/hivemq/edge/adapters/opcua/config/ConnectionOptions.java
Outdated
Show resolved
Hide resolved
...edge-module-opcua/src/main/java/com/hivemq/edge/adapters/opcua/config/ConnectionOptions.java
Outdated
Show resolved
Hide resolved
...edge-module-opcua/src/main/java/com/hivemq/edge/adapters/opcua/config/ConnectionOptions.java
Outdated
Show resolved
Hide resolved
...edge-module-opcua/src/main/java/com/hivemq/edge/adapters/opcua/config/ConnectionOptions.java
Outdated
Show resolved
Hide resolved
modules/hivemq-edge-module-opcua/src/main/java/com/hivemq/edge/adapters/opcua/config/Tls.java
Outdated
Show resolved
Hide resolved
...emq-edge-module-opcua/src/main/java/com/hivemq/edge/adapters/opcua/OpcUaProtocolAdapter.java
Outdated
Show resolved
Hide resolved
hivemq-edge/src/main/java/com/hivemq/protocols/ProtocolAdapterManager.java
Outdated
Show resolved
Hide resolved
hivemq-edge/src/main/java/com/hivemq/embedded/internal/EmbeddedHiveMQImpl.java
Show resolved
Hide resolved
...emq-edge-module-opcua/src/main/java/com/hivemq/edge/adapters/opcua/OpcUaProtocolAdapter.java
Outdated
Show resolved
Hide resolved
…/adapters/opcua/config/ConnectionOptions.java Co-authored-by: Copilot <[email protected]>
…/adapters/opcua/config/TlsChecks.java Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Motivation
Resolves #37845 and #37976
Changes