Hi Biplob,
would you like to send the last value somewhere?
is there a way of detecting when the stream ends? (Something like a marker element, or could you use a timeout?)
Anyways, what you can do is use a flatMap() function, always store the current element. Once the stream is over, you emit the last element.