Dynamic create JobWorker?

Hi, I’am newer to Zeebe. Can Zeebe Client create JobWorker dynamically for different workflow instance.Such as , I’ve initialized a client, but no JobWorkers. Then another user create a workflow instance . The client that I initialized creates JobWorker and finish this workflow instance?


1 Like

Hi @lkestk, yes you can. What language client would you use?

Hi, @jwulf. Thanks for your reply.
I prefer Java, and others language is ok. Is there a simple for this situation?

@lkestk you can take a look at the spring-zeebe project if you are using spring boot: http://github.com/zeebe/spring-zeebe/

@salaboy Thank you. I’ll take a look and try it.

1 Like

Just for documentation - the correct link is: https://github.com/zeebe-io/spring-zeebe

1 Like

Hi , looking at the spring-zeebe project and I couldn’t find anything to dynamically create the JobWorker without the compile time annotations.

I’m trying to create a common library for Camunda/Zeebe where my services know nothing about the Workflow engine. It is pretty much agnostic and this library should take care of dynamically registering workers (specified by individual services) and the individual services just get a plain java call back with necessary payload and rest of the boiler plate is all handled by this common library.

I see this is only possible if there’s an alternative way to create job worker other than via @JobWorker annotation. Thoughts?

Kind of similar to Spring providing Dynamic registration mechanism to create Kafka Listener on the fly than @KafkaListener annotation.

Yes, use the Java client library directly, or patch the Spring client and submit a PR.


Do we have the sample code for this @jwulf