8000 GitHub - jmigueprieto/conductor-client-spring-example: Quick example that shows how to use `conductor-client-spring` to run annotated workers.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jmigueprieto/conductor-client-spring-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Annotated Workers with Spring

Quick example that shows how to use conductor-client-spring to run annotated workers.

Getting Started

  1. Add this dependency to your project.
implementation 'org.conductoross:conductor-client-spring:4.0.1'
  1. Configure the conductor client in application.properties.
conductor.client.base-path=http://localhost:8080/api
  1. Annotate methods in your Component with @WorkerTask, e.g.: ConductorWorkers:
package com.netflix.conductor.example;

import com.netflix.conductor.sdk.workflow.task.WorkerTask;
import org.springframework.stereotype.Component;

@Component
public class ConductorWorkers {

    @WorkerTask(value = "hello-world", threadCount = 5, pollingInterval = 200)
    public String helloWorld() {
        return "Hello World!";
    }
}
  1. That's it! - Run the project.
 ./gradlew bootRun

About

Quick example that shows how to use `conductor-client-spring` to run annotated workers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0