This consistently ends up non-terminating, and it's a bit surprising given that other methods seem to signal operating on closed topics better. I can think of 3 possibilities here:
1) write in the scaladoc of subscribe a warning about this behaviour
2) have the method return a Stream.empty
3) have the method return a Stream.raiseError(...)
Additionally, you'll see in the scatsie the methods topicAwaitInStream*, which could be included as an example in the scaladoc on how to avoid surprising semantics.
using fs2
3.0.6
and3.1.0
. Here's a scatsie. All code pasted in this issue is also in the scatsie.We have as an example of subscriber to a topic subscribing after the topic gets closed:
This consistently ends up non-terminating, and it's a bit surprising given that other methods seem to signal operating on closed topics better. I can think of 3 possibilities here: 1) write in the scaladoc of
subscribe
a warning about this behaviour 2) have the method return aStream.empty
3) have the method return aStream.raiseError(...)
Additionally, you'll see in the scatsie the methods
topicAwaitInStream*
, which could be included as an example in the scaladoc on how to avoid surprising semantics.