Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
zeebeClient
.newWorker()
.jobType(jobType)
.handler(new ExampleJobHandler())
.timeout(Duration.ofSeconds(10))
.open()) {
waitUntilSystemInput("exit");
}
// ...
class ExampleJobHandler implements JobHandler {
public void handle(final JobClient client, final ActivatedJob job) {
// here: business logic that is executed with every job
System.out.println(job);
client.newCompleteCommand(job.getKey()).send().join();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment