temporal-workflow

Why does temporal workflow design numTaskqueueWritePartitions and numTaskqueueReadPartitions?


Can anyone explain why temporal need two paramters: numTaskqueueWritePartitions and numTaskqueueReadPartitions?

I think we use one parameters numTaskqueuePartitions for read and wirte which is enough.


Solution

  • It is needed to support shrinking the number of partitions without losing tasks. Set numTaskqueueWritePartitions < numTaskqueueReadPartitions to drain the backlog from the partitions to be removed. After no messages are left in those partitions set numTaskqueueReadPartitions to the value of numTaskqueueWritePartitions.