Skip to content

Commit

Permalink
WIP: Increase http client's max chunk size
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrrr committed Sep 21, 2023
1 parent 7600c4a commit 63ff79a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public final class KsqlRestClient implements Closeable {
static final String CCLOUD_CONNECT_USERNAME_HEADER = "X-Confluent-API-Key";
static final String CCLOUD_CONNECT_PASSWORD_HEADER = "X-Confluent-API-Secret";

static final int CHUNK_SIZE = 16 * 1024 * 1204;

private final KsqlClient client;
private final LocalProperties localProperties;
private final AtomicReference<String> serializedConsistencyVector;
Expand Down Expand Up @@ -113,8 +115,10 @@ public static KsqlRestClient create(
creds,
ccloudApiKey,
(cprops, credz, lprops) -> new KsqlClient(cprops, credz, lprops,
new HttpClientOptions(),
Optional.of(new HttpClientOptions().setProtocolVersion(HttpVersion.HTTP_2)))
new HttpClientOptions().setMaxChunkSize(CHUNK_SIZE),
Optional.of(new HttpClientOptions()
.setProtocolVersion(HttpVersion.HTTP_2)
.setMaxChunkSize(CHUNK_SIZE)))
);
}

Expand Down

0 comments on commit 63ff79a

Please sign in to comment.