Andrea Cosentino created CAMEL-23295:
----------------------------------------

             Summary: Fix resource leak and improve error handling in 
camel-splunk-hec producer
                 Key: CAMEL-23295
                 URL: https://issues.apache.org/jira/browse/CAMEL-23295
             Project: Camel
          Issue Type: Bug
          Components: camel-splunk-hec
            Reporter: Andrea Cosentino


SplunkHECProducer.java has a few issues that should be addressed:

1. *Resource leak*: HttpPost is not properly cleaned up when an exception 
occurs, which could lead to connection leaks under error conditions.

2. *Poor error handling*: Errors are wrapped in a generic RuntimeException 
without logging the HTTP error response body, making debugging difficult.

3. *Missing warning for skipTlsVerify*: When skipTlsVerify is enabled, hostname 
validation is fully disabled but there is no log warning to alert operators 
that this setting is active. A warning log should be emitted so that users are 
aware of the reduced verification.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to