Created
April 7, 2021 09:10
-
-
Save berndruecker/c379e8ea4e2ddaa134764d94c4a560b6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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