There are a couple of approaches to help here.
- You can route activities to hosts or even specific processes. So you can ensure that the activities access the same in-memory cache if needed.
- You can implement your own “cancel” activity that would be invoked at the same host. This way heartbeating wouldn’t be required to deliver cancellation. It still will be required to detect worker process failure.