[grpc-io] [grpc-java] client-side reconnect

2016-08-25 Thread Ivan Vaskevych
Hi, How do I use client-side backoff reconnect correctly? Scenario: client-side streaming, plainText. When I stop the server I get the error below. After server restart, client doesn't reconnect. That makes sense since I get onError on my StreamObserver. *What should I do* on client side, recr

Re: [grpc-io] [grpc-java] client-side reconnect

2016-08-25 Thread 'Louis Ryan' via grpc.io
Inf-flight streams do not survive server disconnects. The Channel you created on the client will attempt to reconnect so can so you can re-start your call On Thu, Aug 25, 2016 at 4:05 AM, Ivan Vaskevych wrote: > Hi, > > How do I use client-side backoff reconnect correctly? > > Scenario: client-s

Re: [grpc-io] [grpc-java] client-side reconnect

2016-08-25 Thread Ivan Vaskevych
Yes, I can reuse the Channel. But I do so from the onError of my StreamObserver and it creates a new instance of self (StreamObserver). That also creates excessive logging due to constant (onError -> try to connect) cycles. Is there a better way to do it? Thanks! On Thu, Aug 25, 2016 at 7:24 PM,

Re: [grpc-io] [grpc-java] client-side reconnect

2016-08-25 Thread 'Louis Ryan' via grpc.io
You probably want to use CallOptions.withWaitForReady() so that the call queues until the transport becomes available. On Thu, Aug 25, 2016 at 1:54 PM, Ivan Vaskevych wrote: > Yes, I can reuse the Channel. But I do so from the onError of my > StreamObserver and it creates a new instance of self

Re: [grpc-io] [grpc-java] client-side reconnect

2016-08-25 Thread 'Eric Anderson' via grpc.io
Note that we are aware setting wait for ready is more painful than it should be (you have to use a client interceptor today), due to these two issues. On Thu, Aug 25, 2016 at 3:08 PM, 'Louis Ryan' via g