Describe the bug
When calling ApiClient.getMessageDetails(messageId) to retrieve outbound email details with large bodies, the SDK intermittently throws a java.io.EOFException: Unexpected end of ZLIB input stream during JSON deserialization.
Expected behavior
I expect the 200 code to be returned. Instead we get an exception
Java (please complete the following information):
- Java 11
- Postmark client: 1.11.1
Additional context
To isolate the root cause, we built a custom wrapper extending ApiClient that splits the transport layer into two implementations using Apache HttpClient 5:
HTTP/1.1 Pathway: Using the classic blocking CloseableHttpClient.
HTTP/2 Pathway: Using the reactive/async CloseableHttpAsyncClient (which natively supports HTTP/2).
Results:
HTTP/1.1 Path: Consistently fails with java.io.EOFException: Unexpected end of ZLIB input stream when parsing large messages.
HTTP/2 Path: Works flawlessly for the exact same messageId
Describe the bug
When calling ApiClient.getMessageDetails(messageId) to retrieve outbound email details with large bodies, the SDK intermittently throws a java.io.EOFException: Unexpected end of ZLIB input stream during JSON deserialization.
Expected behavior
I expect the 200 code to be returned. Instead we get an exception
Java (please complete the following information):
Additional context
To isolate the root cause, we built a custom wrapper extending ApiClient that splits the transport layer into two implementations using Apache HttpClient 5:
HTTP/1.1 Pathway: Using the classic blocking CloseableHttpClient.
HTTP/2 Pathway: Using the reactive/async CloseableHttpAsyncClient (which natively supports HTTP/2).
Results:
HTTP/1.1 Path: Consistently fails with java.io.EOFException: Unexpected end of ZLIB input stream when parsing large messages.
HTTP/2 Path: Works flawlessly for the exact same messageId