Ok, I might've went a bit to much into the weeds of HTTP streams with my answer.
> 1. when the program calls streamClientSender1.onNext(request), request will be sent in a stream, if I call it again will it be in the same stream as long as the age of the stream is within max connection age ?
First, to clarify - the stream is not created whenever onNext is called. It's created on the first stub.sendRequest call. The stream will persist until the RPC is complete.
> 2. does streamClientSender1.onNext() and streamClientSender2.onNext() use different streams to send request, since they are two different streamObserver objects.
Yes, two different streams - just with the same correction that stub.sendRequest is what initiates a stream.
Messages is sent in order and tied to a stream.
> 3. Is there a way to get StreamID of streams created and print it as a verification step so that the above two questions can be answered ?
> All GRPC calls need to specify an internal ID. We will use HTTP2 stream-ids as call identifiers in this scheme. NOTE: These ids are contextual to an open HTTP2 session and will not be unique within a given process that is handling more than one HTTP2 session nor can they be used as GUIDs.
Sergii