You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2023/01/04 10:33:14 UTC

[GitHub] [camel] SteinOv opened a new pull request, #8971: camel-plc4x: Added autoReconnect uri parameter

SteinOv opened a new pull request, #8971:
URL: https://github.com/apache/camel/pull/8971

   I don't have a JIRA account yet, so I couldn't create an issue (I send an email to private@camel.apache.org, is that the right approach).
   
   I added an uri parameter "autoReconnect". If enabled, when a request is made and there is no connection, an attempt to reconnect is made.
   


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] davsclaus commented on pull request #8971: camel-plc4x: Added autoReconnect uri parameter

Posted by GitBox <gi...@apache.org>.
davsclaus commented on PR #8971:
URL: https://github.com/apache/camel/pull/8971#issuecomment-1370807180

   In case the connection is NOT connected and auto reconnect = false, would the connection be "bad" all the time, or can the connection somehow re-establish itself and become working again ?


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] davsclaus commented on a diff in pull request #8971: camel-plc4x: Added autoReconnect uri parameter

Posted by GitBox <gi...@apache.org>.
davsclaus commented on code in PR #8971:
URL: https://github.com/apache/camel/pull/8971#discussion_r1061385636


##########
components/camel-plc4x/src/main/java/org/apache/camel/component/plc4x/Plc4XConsumer.java:
##########
@@ -85,6 +86,15 @@ protected void doStart() throws Exception {
     }
 
     private void startUnTriggered() {
+        if (plc4XEndpoint.isAutoReconnect() && !plcConnection.isConnected()) {
+            try {
+                plc4XEndpoint.reconnect();
+                LOGGER.debug("Successfully reconnected");
+            } catch (PlcConnectionException e) {
+                LOGGER.error("Unable to reconnect, skipping request", e);

Review Comment:
   Maybe tone down the logging to WARN as you are dealing with this error by skipping.



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] SteinOv commented on pull request #8971: camel-plc4x: Added autoReconnect uri parameter

Posted by GitBox <gi...@apache.org>.
SteinOv commented on PR #8971:
URL: https://github.com/apache/camel/pull/8971#issuecomment-1370873734

   > In case the connection is NOT connected and auto reconnect = false, would the connection be "bad" all the time, or can the connection somehow re-establish itself and become working again ?
   
   The connection could be re-established manually, for example in a custom processor by using Plc4XEndpoint.getConnection().connect(). The connection cannot re-establish itself in any way before my changes.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #8971: camel-plc4x: Added autoReconnect uri parameter

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8971:
URL: https://github.com/apache/camel/pull/8971#issuecomment-1370834636

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 1 | 1 | 1 | 1 |


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #8971: camel-plc4x: Added autoReconnect uri parameter

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8971:
URL: https://github.com/apache/camel/pull/8971#issuecomment-1370949098

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 1 | 1 | 0 | 2 |


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] davsclaus merged pull request #8971: camel-plc4x: Added autoReconnect uri parameter

Posted by GitBox <gi...@apache.org>.
davsclaus merged PR #8971:
URL: https://github.com/apache/camel/pull/8971


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #8971: camel-plc4x: Added autoReconnect uri parameter

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8971:
URL: https://github.com/apache/camel/pull/8971#issuecomment-1370797296

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 1 | 1 | 1 | 0 |


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #8971: camel-plc4x: Added autoReconnect uri parameter

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8971:
URL: https://github.com/apache/camel/pull/8971#issuecomment-1370752176

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :warning: Please note that the changes on this PR may be **tested automatically**. 
   
   If necessary Apache Camel Committers may access logs and test results in the job summaries!


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org