What is actually a “topic” in Camunda External Task?

I have tried the External Task Pattern for the Camunda workflow engine. I understand that external tasks are performed by some other Workers and the “topic” name is the main thing between the BPMN engine and the Worker process.

I am confused with the word “topic” and “subscription” mechanism. Is it really a messaging queue kind of topic? What is the actual implementation/technology behind this “topic” name, which we specify in External Task configuration and then same used in Worker to subscribe to the topic?

Hi @Himanshu_Singh,

the process engine puts all external task instances into an (internal) external task list. Technically it’s a database table, but you can look at it as task queue.

The topic serves as an identifier to tasks of the same type, that can be handled by one (or more) workers. Technically, it is a column of the database table.

Workers, on the other side, can fetch-and-lock tasks for one or more topics. You can see the subscription as an announcement of the worker to the engine, which topics the worker would work on. This term is only used to organize your worker code. Under the hood, the worker starts an infinite loop and call the fetch-and-lock rest endpoint: Fetch and Lock External Tasks | docs.camunda.org.

A basic implementation of a worker doesn’t need the subscription, just the loop with fetch-and-lock and complete the fetched tasks after the work is done: code/PythonWorker.py at master · camunda-consulting/code · GitHub

Hope this helps, Ingo