Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. ZeebeClient client = ZeebeClient.newClientBuilder().brokerContactPoint("127.0.0.1:26500").build();
  2.  
  3. JobWorker workerRegistration = client
  4. .newWorker()
  5. .jobType("my-service-task")
  6. .handler(new JobHandler() {
  7. public void handle(JobClient client, ActivatedJob job) {
  8. // here: business logic that is executed with every job
  9. System.out.println(job);
  10. // and let the workflow engine know we are done.
  11. // The API can be used blocking or non-blocking
  12. client.newCompleteCommand(job.getKey()).send().join();
  13. }
  14. )
  15. .timeout(Duration.ofSeconds(10))
  16. .open();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement