I learn Spring Cloud Task and I write simple application that is divided into 3 services. First is a TaskApplication
that have only main()
and implements CommandLineRunner
, second is a TaskIntakeApplication
that receives request and send them to RabbitMQ, third service is an TaskLauncherApplication
that receives messages from RabbitMQ and runs the task with received parameters.
@Component
@EnableBinding(Source.class)
public class TaskProcessor {
@Autowired
private Source source;
public void publishRequest(String arguments) {
final String url = "maven://groupId:artifatcId:jar:version";
final List<String> args = Arrays.asList(arguments.split(","));
final TaskLaunchRequest request = new TaskLaunchRequest(url, args, null, null, "TaskApplication");
final GenericMessage<TaskLaunchRequest> message = new GenericMessage<>(request);
source.output().send(message);
}
}
And as you can see I call my built artifact by giving maven url but I wonder how can I call artifact from another docker container?