When I tried to adapt example interceptor as a stream-stream interceptor, 
it didn't quite work.

response = continuation(client_call_details, request)
isinstance(response, grpc.RpcError) # Returns True as expected
response.code() # Blocks

Is this expected? Is there a way to implement a retry interceptor for a 
unary-stream and stream-stream RPC?

On Wednesday, January 29, 2020 at 2:05:00 PM UTC-5 Richard Belleville wrote:

> Kristof,
>
> I don't currently have a timeline for in-library support for retries, but 
> implementing it using interceptors isn't too difficult. Here's an example 
> <https://github.com/grpc/grpc/issues/19514#issuecomment-531700657> of an 
> interceptor a member of the community shared a while ago.
>
> Thanks,
> Richard
>
> On Monday, January 27, 2020 at 2:30:40 PM UTC-8 Kristof wrote:
>
>> Hi 👋 
>>
>> As far as I can tell the python client implementation doesn't yet support 
>> retries (is there a timeline).
>>
>> Despite this, GitHub issues and documentation suggest that a retry 
>> mechanism is possible to implement in a python client with an interceptor.
>>
>> As this seems like a generic problem that is applicable to all kinds of 
>> gRPC clients, somebody must have already implemented it open source.
>>
>> Do you guys know of code examples on how to implement retry in a python 
>> interceptor?
>>
>> Thanks
>>
>> K
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/2d01bba7-2a0a-41a7-af8f-60e364c14176n%40googlegroups.com.

Reply via email to