Spring Zeebe task type dynamic

im using spring boot to consume 2 task(worker) types

i want to make the task type dynamic per environment.
@ZeebeWorker(type = “read-{prop}”, autoComplete = true)

{prop} would be define in app.properties

i know i can use zeebe.client.worker.default-type
but i have 2 worker types i need to consume

any way to do it with Spring Zeebe?

@ZeebeWorker(type = “read-${prop}”, autoComplete = true)
like this its will work! :slight_smile:

2 Likes

Hi Team , This doesnt works for me
@JobWorker(fetchAllVariables = true, type = “${prop.workerName}”).
I am using Spring Zeebe Starter 8.1.17

they change the library and its not supported from 8.0.5 i think :sob:

oh ok. This was a useful feature. To have dynamic worker name.

indeed!

u can use this key in application.properties and its will take it by default

zeebe:
client:
worker:
default-type: workername

and in java
@JobWorker(fetchAllVariables = true).

but ur limit to only 1 dynamic property

Thanks @CMX !