You should cast from the StreamObserver to a CallStreamObserver and only 
send messages when isReady() is true.  You can wait for it to become true 
by setting an isReady handler (look in that class for the exact method 
name). 

On Thursday, December 28, 2017 at 5:05:48 PM UTC-8, 
matt.m...@lucidworks.com wrote:
>
> Hi, 
>
> I have an application which receives messages from a client on a 
> bidirectional channel. There’s a case where I’d quickly stop processing 
> messages on the server’s StreamObserver (after I’ve told the client to stop 
> also), but I’m not sure of what’s actually happening to the already 
> recieved messages in gRPC? I’m assuming they are sitting in some Netty 
> queue. Is there a way to throw out those messages, or am I stuck just 
> processing them all anyway? If the latter is the only way, can I somehow 
> control the queue size so it doesn’t take a potentially long time to run 
> through them all? 
>
> Thanks, 
> - Matt

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
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/e993fdee-e408-43e1-b224-898303670585%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to