Search code examples
camunda

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.

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?


Solution

  • Camunda does not bundle any middleware (as the name topic may suggest). The implementation of the external task topics is a simple database table,as you can see in the documentation here: https://docs.camunda.org/manual/latest/user-guide/process-engine/database/database-schema/#engine-bpmn, specifically the ACT_RU_EXT_TASK table here: https://docs.camunda.org/manual/latest/user-guide/process-engine/img/erd_715_bpmn.svg

    The topic name is a column in this table used to select only the external tasks which can be performed by the worker. The worker communicates to the engine which type of work it can perform by 'subscribing' to a specific topic. (However, technically no subscription in the sense of a registration with the engine takes place. It is just setting a configuration of the worker, which will lead to the correct attribute being set on the REST API call.)

    Also see: https://docs.camunda.org/manual/latest/user-guide/process-engine/external-tasks/