Add Task Event Listener

Adds a Task Listener that emits the TaskExecution as an event via a
Spring Cloud Stream channel (essentially the listener serves as a SCSt
Source).

Resolves spring-cloud/spring-cloud-task#11
This commit is contained in:
Michael Minella
2016-04-01 11:26:56 -05:00
committed by Ilayaperumal Gopinathan
parent 5b72400b06
commit 8368a1cf8c
16 changed files with 766 additions and 53 deletions

View File

@@ -0,0 +1,33 @@
= Task Events
This is a task application that emits events on a channel named `task-events`
== Requirements:
* Java 7 or Above
== Build:
[source,shell,indent=2]
----
$ ./mvnw clean install
----
== Execution:
[source,shell,indent=2]
----
$ java -jar target/task-events-1.0.0.BUILD-SNAPSHOT.jar --spring.cloud.stream.bindings.task-events.contentType=application/json
----
You can listen for the events on the task-events channel with a Spring Cloud Stream Sink
like the log sink using the following:
[source,shell,indent=2]
----
$ java -jar <PATH_TO_LOG_SINK_JAR>/log-sink-1.0.0.BUILD-SNAPSHOT-exec.jar --server.port=9090 --spring.cloud.stream.bindings.input.destination=task-events
----
== Dependencies:
The task processor requires an instance of Redis to be running.