missionary

awb99 2024-07-18T22:27:22.829909Z

I created a flow with m/observe where I get a ! Function that I can call to send events/data. So when there is no consumer I cannot /will not send events. When there is one consumer then calling the ! function will push the event to the consumer. I guess the function will block until the one consumer has read the data. Then I added two consumers and found out that only the last added consumer will get all the events. This behavior seems to be consistent. Now when I wrap my m/observe flow with m/stream then all consumers get all events. So I wonder how long ! Function will block .. I guess until all consumers have read an event. But I am not sure .. might be there is no blocking at all. Any ideas? Thanks!

leonoel 2024-07-19T08:30:17.578139Z

m/stream collects backpressure from all consumers, the callback will block until all consumers have transferred the value

leonoel 2024-07-19T08:32:46.340769Z

without m/stream, if there are two consumers the observe subject will be called twice so you have two callbacks, one for each consumer

awb99 2024-07-20T02:40:45.038529Z

Thanks @leonoel

awb99 2024-07-20T02:41:52.598759Z

In my test example I had one consumer not receiving any data without m/stream. I will Post the example tomorrow.