Skip to content

Setting a deadline for a long-lived streaming stub #5498

@danotorrey

Description

@danotorrey

We are using an implementation of bi-directional gRPC streaming, and are interested in setting an appropriate deadline for each request. The stub is used for a long-lived/high throughput stream.

When using unary, I know we could create a new stub for each request, then use it for the unary request.

However, with streaming, the stub is used for lots and lots of requests. Is there a way to set the deadline for an existing stub on on a message by message basis? I did not see anything for streaming deadlines in the examples https://github.com/grpc/grpc-java/tree/master/examples.

In our code, we are using requestStreamObserver.onNext(requestMessage) to queue up each message for sending.

What version of gRPC are you using? 1.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions