We are starting reviewing Camunda, we have a simple POC in place using external tasks coded in C#, works as expected but we want to get away from polling, any plans or features to have a external task subscribe to a topic and receive events when work is available?
@luis_trujillo something I also started to work on, was using vertx to provide a event bus/web socket connection, but was also thinking about routing the events into RMQ, Kafka, or amqp.
RabbitMQ would be perfect for us, in fact as POC we created a middle service that fetch and lock pending external tasks, then we push a message into the service bus, is not ideal and just a dirty hack but the scaling of external tasks was perfect, we deployed all these service within a cluster with RMQ.
There is a working html file with the sockJS so you can easily test.
The overall plugin basically launches a Vertx.io instance as a Camunda Plugin, you can configure which verticles to deploy based on the YAML file (see the plugin readme).
And those “config” values would be avaliable in the “external-task-tcp.js” verticle.
you can see here:
This is example of a To and From websocket where you can receive data and send it back using permitted addresses.
In practice you could write a small listener for new External Task parsing, or you just write a External Task Query using the processEngine variable that is exposed in the verticle (you have full access to the Java API of camunda through the processEngine variable.
So then you could setup one or more recurring queries that happen every N seconds (as per the example) and send their results over the eventBus / websocket.
Also if you wanted to scale this, you can just setup the actual websocket on another Vertx Instance and use the Event Bus: So the vertx instance in the Camunda PLugin would do the queries and pass the data into the bus, and other vertx instances outside of the Camunda plugin, would do the actual work and things like websockets, etc. You even get High Availability/failover + clustering on the vertx instances with this setup.