Executing business logic in Zeebe brokers


Can we execute Java Delegates and Listeners like TaskListener/ExecutionListener in Zeebe broker like camunda process engine?


Hi @aravindhrs,

It’s not possible to execute business logic in the Zeebe brokers the way you might with Camunda BPM. In Zeebe, the engine is responsible only for managing the state of active workflow instances, and all business logic is carried out by external services.

Because Zeebe will often be used in microservices architectures where loose coupling and service independence are desired, we want to be sure that Zeebe, too, can be used within a well-defined scope where it focuses on its responsibility of orchestrating.

Please let me know if you have any follow-up questions.


Thanks @wints.

While setting up Zeebe brokers might require some code related to configurations?

And also Gateway also mentioned in Zeebe cluster, can we use Netflix Zuul/ Consul gateway which is stateless by nature?

Or you are referring the Gateway is inbuilt with broker itself or zeebe itself provides solutions for Gateway component?

How Each Zeebe brokers in the cluster registers to Gateway to serve client request in load balanced manner?


Hi @aravindhrs,

• Regarding this question:

While setting up Zeebe brokers might require some code related to configurations?

What sort of configuration are you referring to?

One thing I’ll note that might be relevant: when creating a workflow model in Zeebe, each Service Task needs to have a Type (in the Zeebe Modeler, this is set in the Properties panel). This Type is the type of job that will be created when a workflow instance progresses to that task; job workers must then also include this Type when requesting jobs from the broker.

• The gateway in Zeebe is a “built-in” component and can’t be swapped for other gateways. The Zeebe gateway is also stateless, and it’s possible to deploy more than one gateway for high availability and load balancing.

• Zeebe uses partitions as its scalability mechanism. The gateway will distribute new workflow instance requests across all known partitions in a round-robin fashion. All subsequent processing related to the workflow instance will happen on the same partition where the instance was created. This all happens “under the hood”, by the way, so as a user you wouldn’t have to manage this beyond setting e.g. partitionsCount and replicationFactor in the Zeebe config file (see the [cluster] section).

Let me know if that answers your questions!



It was great explanation and gives me more clarity on zeebe. But still I have a question in Gateway.

If Gateway is builtin with zeebe and scalable, then whenever we do scaling of gateway other zeebe components also getting scaled up since it was builtin component. Is that possible to scaleup only the Gateway component and leaving the other components as it is?


Hi @aravindhrs,

Yes, it’s possible to deploy / scale gateways independently of other Zeebe components. This “standalone gateway” approach is useful for clusters where you might require 12 partitions but only 3 gateways with a load balancer in front.

We haven’t documented this in detail yet, but we are working on it :slight_smile:



where can i download the gateway component independently from other components?

Load balancing solution we only have to provide? Zeebe components doesn’t have load balancing feature?


Hi @aravindhrs,

Regarding the standalone gateway:

• You can find a startup script under bin/gateway and a configuration file conf/gateway.cfg.toml

• The configuration file is available here: https://github.com/zeebe-io/zeebe/blob/master/dist/src/main/config/gateway.cfg.toml

• If you use a standalone gateway, you probably want to disable the embedded gateway inside the brokers by setting this config to false.

I’ve created an issue in GitHub so we remember to document this in the future :slight_smile:

And yes, if you want load balancing for requests between the job workers and the Zeebe gateway, you’d need to provide the load balancer, too. Note, however, that Zeebe manages the distribution of workflow instances across partitions, and this isn’t something the user needs to worry about.

Let me know if that clarifies.



That sounds great :slight_smile:

So every Zeebe broker comes with embedded gateway, and we can optionally disable it. By this way we can have control over of how many instances of gateway is active and based on the load we can scale up independently.

Thanks @wints :slight_smile: