square / square/wire

GrpcStreamingCall client buffers packets and flushes only after timeout — not receiving events in real-time

Open
#3,370 3 comments 0 reactions 1 assignee View on GitHub

@swankjesse is already working on this.

Since Sep 3, 2025.

Dominant language
Kotlin
Stars
4.4k
Forks
627
Avg merge
3d 15m
Merged PRs (30d)
20

Description

I'm using com.squareup.wire.GrpcStreamingCall along with OkHttp in a Kotlin mobile app to stream gRPC events from a backend service. The issue I'm facing is that the client does not receive the streamed packets in real-time.

Instead, all packets are buffered internally and delivered together only when the server closes the connection or times out the session (e.g., after 5 minutes). This defeats the purpose of a streaming connection.

There is no any problem from backend side, API's are working fine in Postman.

Expected Behavior

  • Packets should be delivered immediately to the client as the server sends them (real-time).
  • The GrpcStreamingCall.response flow should emit each message as it arrives on the wire.

Actual Behavior

  • Packets are only emitted from the flow after several minutes — when the session is closed/timed out.
  • All buffered packets arrive together at once, as if they were delayed or cached.

Please help me out in fixing this problem

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.