Personally I would use an interceptor if there aren't many different many different kinds of methods.
Another option is to put the deadline in the proto file (assuming you are using protobuf), as a method option <https://github.com/google/protobuf/blob/master/src/google/protobuf/descriptor.proto#L611>. This would need special handling to make sure you still inherit the deadline from the context, but you could read that from the interceptor easily. On Wednesday, May 31, 2017 at 12:49:21 AM UTC-7, Ryan Michela wrote: > > As indicated in this thread > <https://github.com/grpc/grpc-java/issues/1495>, a fresh deadline should > be created for every call. What is the best way to override the default > deadline for a Client so that every request uses a fresh deadline with the > same duration? > > Should I create a ClientInterceptor to fiddle with > CallOptions.withDeadlineAfter() for every request? > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/66faf6e5-2fbe-4745-a9bc-9f77bb1c3027%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
