PDGGK opened a new issue, #39403:
URL: https://github.com/apache/beam/issues/39403

   ### What happened?
   
   In the Solace IO connector, 
`org.apache.beam.sdk.io.solace.broker.BrokerResponse` reads the SEMP HTTP 
response body but never closes the underlying `InputStream`:
   
   ```java
   public BrokerResponse(int responseCode, String message, @Nullable 
InputStream content) {
     ...
     if (content != null) {
       this.content =
           new BufferedReader(new InputStreamReader(content, 
StandardCharsets.UTF_8))
               .lines()
               .collect(Collectors.joining("\n"));
     }
   }
   ```
   
   `BrokerResponse.fromHttpResponse(HttpResponse)` feeds 
`response.getContent()` into this constructor, and 
`SempBasicAuthClientExecutor` (`getQueueResponse` / `createQueueResponse` / 
`createSubscriptionResponse`) never calls `response.disconnect()` nor closes 
the stream elsewhere. As a result, every SEMP request leaks the HTTP response 
content stream / connection.
   
   ### Expected behaviour
   
   The response body stream should be closed once it has been read.
   
   ### Component
   
   io-java-solace
   


-- 
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]

Reply via email to