*NOTE*: The same code works perfectly if I switch streams to normal GRPC calls.
But, to avoid extra latency, I need to use streams. On Thursday, May 27, 2021 at 10:25:55 AM UTC+5:30 nitish bhardwaj wrote: > Hi, > > I am trying to use bi-directional streams with JAVA. Everything works as > expected in a POC of bi-di stream where I have 1 client and server which > reads and writes to it. > > But, it starts to break when I use the same in a mature way. > > *UseCase:* I am trying to implement gossip using grpc in Java. Whenever > any server receives a request, it gossips to the other 2 servers using grpc > streams. For an instance, I have 4 servers, server1, server2, server3 and > server4. All servers have 1 client configured to connect to every other > server. > > whenever any server receives a message, it selects the other two servers > and transmits the message and the other server does the same. > > *Issue: *As each request would be served in a new thread by grpc, I get > an error > Cancelling the stream with status Status{code=INTERNAL, description=Too > many) responses, cause=null} > > That's bcz every request is read and write to stream isn't sync as it > might not have got a response from server stream but it has written new > data to it on a new request. > > What can be done to overcome this problem? > > Thanks for the support!! > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/7fe537c0-ac40-48eb-913c-5c1ad8be066cn%40googlegroups.com.