My use case - I have two sets of activities - one for produces events in external system (let’s say Kafka) and another for consuming these events. Both activities are working simultaneously. Is there a mechanism for notifying consumer activity that producer activity ended and once you process all remaining events from external system you can exit, and not wait for other events to be added?
In normal case (when workers are not failing) canceling consumer activities context will do the job. But is there more reliable way of doing that?