Purge Task Queue

Hey Guys,

A question pop up today, if temporal server overloaded, what should we do to purge the task queue?

What do you mean by purging the task queue?

Do you mean you want to lose all open workflows? Then just wipe out and recreate the database.

AFAIK the majority of the use cases do not allow data loss and deal with overloads by slowing down the starts of new workflows and scaling up persistence and the cluster.

Ok only one queue i want to close all open workflows, is there command for that? Or we have to terminate all the workflows by api?

You can batch terminate workflows based on their properties. But it only works when Elastic Search integration is enabled.

Speak of the devil, for ES, would you guys start a doc section on how to hook it up and etc?