I think you meant "fail-fast", which is the opposite of wait-for-ready.

A wait-for-ready RPC will persist until it's sent to a server or meets its 
deadline.

Fail-fast means the RPC will fail if there is any connection-level error, 
which could be but no limited to name resolution error, connection refused, 
or handshake failed. However, RPCs will wait if connection is in progress.

Tim, the fail-fast behavior (which is the default) should work for you. 
Every connection failure will come back as a stream failure if you always 
create a new stream as soon as the previous one finishes.

On Thursday, January 5, 2017 at 5:51:05 PM UTC-8, Carl Mastrangelo wrote:
>
> You can use waitForReady to shortcut RPCs.  It will fail them immediately 
> if there is not a connection I believe.  You can set it on the CallOptions 
> or the Stub. 
>
> On Friday, December 16, 2016 at 9:56:35 AM UTC-8, Tim McManamey wrote:
>>
>> I'm implementing this in Java.
>>
>> On Friday, December 16, 2016 at 11:55:49 AM UTC-6, Tim McManamey wrote:
>>>
>>> I'm using a bi-directional connection with StreamObserver.  I want to be 
>>> able to check the status of the connection periodically and respond 
>>> appropriately.  I know that netty will cache the data until a reconnect, 
>>> but I don't want to do that.  I want to be able to discard the data until 
>>> the connection is re-established.  I've seen many mention using pings, but 
>>> I don't know how that works.  Thanks for any help.
>>>
>>> Tim
>>>
>>

-- 
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/6afc3fd6-9ef0-46ac-a21b-f20126822ff1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to