Hi Thanks for the reply- I was under the initial assumption that separate streaming stubs would create separate connections .. but the connection is on the managed channel so at the moment I've moved to just creating one per thread call.
On Monday, June 19, 2017 at 2:44:39 PM UTC-4, spenc...@google.com wrote: > > StreamObserver is not thread safe, so if multiple threads are producing > data, you must synchronize the calls. You can find more details here: > http://www.grpc.io/grpc-java/javadoc/io/grpc/stub/StreamObserver.html > > Can you elaborate on your use and why multiple threads are writing on this > streaming call, rather than having a call per thread? > > On Friday, June 16, 2017 at 1:03:39 PM UTC-7, cr2...@gmail.com wrote: >> >> Hi >> Are the Java steaming APIs thread safe ? >> If I have a StreamingObserver.onNext(<mydata>) with potentially multiple >> threads calling that >> then on the StreamObserver's implemented interface onNext method how can >> associate the response back to a specific >> thread's call to the StreamingObserver.onNext(<mydata>) ? >> >> Hope that made sense :) >> >> Thanks in advance. >> > -- 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/0f1bd6bd-7d8a-4c5e-8d98-11d3a3536a5b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.