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:
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
What happened?
In the Solace IO connector,
org.apache.beam.sdk.io.solace.broker.BrokerResponsereads the SEMP HTTP response body but never closes the underlyingInputStream:BrokerResponse.fromHttpResponse(HttpResponse)feedsresponse.getContent()into this constructor, andSempBasicAuthClientExecutor(getQueueResponse/createQueueResponse/createSubscriptionResponse) never callsresponse.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