Move pending tasks to a different task queue

We have a use case where we have a need for prioritized activity execution. I understand that temporal doesnt support priority in the task queues. So, we are trying to use multiple task queues one per priority.

However, once in a while we will need to reprioritize pending activities(ones waiting in the task queue). My original idea was to cancel the activities and reschedule them on a different task queue when I receive the signal in the workflow, but this approach also cancels running activities which we dont want. We only want to move the activities that havent been picked up by a worker yet.

Really appreciate the help and hoping for a workaround.

A workaround is for this activity to send a signal to a workflow at the beginning of the execution.

Interesting! Very helpful, thanks!

this approach also cancels running activities which we dont want.

Activities can ignore the cancellation requests. If they don’t heartbeat, they will not receive the cancellation request anyway.