[ 
https://issues.apache.org/jira/browse/CAMEL-26339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen resolved CAMEL-26339.
---------------------------------
    Resolution: Fixed

Fixed by https://github.com/apache/camel/pull/28556 (merged to main as 
b18e4520df39).

> camel-plc4x - the triggered consumer logs a WARN with a stack trace on every 
> failed poll
> ----------------------------------------------------------------------------------------
>
>                 Key: CAMEL-26339
>                 URL: https://issues.apache.org/jira/browse/CAMEL-26339
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Claus Ibsen
>            Assignee: Serdar Gökay
>            Priority: Minor
>             Fix For: 4.24.0
>
>
> When the PLC cannot be reached, the triggered consumer of camel-plc4x (a 
> {{trigger}} on the endpoint, which polls every {{period}} ms) fails every 
> poll. Each failed poll goes to the consumer's exception handler, which logs a 
> WARN with the full stack trace ({{Failed polling endpoint: ...}}). With 
> {{period=100}} that is ten stack traces a second for as long as the PLC is 
> down.
> With the default {{autoReconnect=false}} each poll also logs {{Connection 
> lost and auto-reconnect is turned off, shutting down Plc4XEndpoint}} from 
> {{Plc4XEndpoint.reconnectIfNeeded()}}, and stops the endpoint again, while 
> the route keeps polling.
> Users cannot calm this down with the scheduled poll options 
> ({{backoffErrorThreshold}}, {{backoffMultiplier}}), because {{Plc4XEndpoint}} 
> is a {{DefaultEndpoint}} and does not offer them.
> This was seen in the review of CAMEL-25617 
> (https://github.com/apache/camel/pull/28387), on a real S7-1200 and on 
> protocol simulators, and was left for a follow-up.
> Possible directions:
> * Log the first failed poll of a run of failures at WARN with the stack 
> trace, the following ones without the stack trace or at DEBUG, and log once 
> at INFO when a poll succeeds again.
> * With {{autoReconnect=false}}, log the shutdown once, and stop polling (or 
> fail the route) rather than repeating it on every poll.
> * Optionally offer the backoff options of a scheduled poll consumer on the 
> endpoint.
> The other consumers and the producer share {{reconnectIfNeeded()}}, so they 
> are worth a look too.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to