updated stream script for supplier and consumer
This commit is contained in:
30
README.adoc
30
README.adoc
@@ -49,8 +49,34 @@ curl -H "Accept: application/json" :9001/supplier
|
||||
curl -X POST -H "Content-Type: text/plain" -d foo :9002/consumer
|
||||
----
|
||||
|
||||
== Run a Stream Processing Microservice using the Function:
|
||||
== Run Stream Processing Microservices:
|
||||
|
||||
First register a streaming words supplier:
|
||||
|
||||
----
|
||||
./stream.sh -i words -o uppercaseWords -f uppercase
|
||||
./registerSupplier.sh -n wordstream -f "()->Flux.intervalMillis(1000).map(i->\"message-\"+i)
|
||||
----
|
||||
|
||||
Then start the source (supplier), processor (function), and sink (consumer) apps:
|
||||
|
||||
----
|
||||
./stream.sh -p 9101 -s wordstream -o words
|
||||
./stream.sh -p 9102 -i words -f uppercase -o uppercaseWords
|
||||
./stream.sh -p 9103 -i uppercaseWords -c print
|
||||
----
|
||||
|
||||
The output will appear in the console of the sink app (one message per second, converted to uppercase):
|
||||
|
||||
----
|
||||
MESSAGE-0
|
||||
MESSAGE-1
|
||||
MESSAGE-2
|
||||
MESSAGE-3
|
||||
MESSAGE-4
|
||||
MESSAGE-5
|
||||
MESSAGE-6
|
||||
MESSAGE-7
|
||||
MESSAGE-8
|
||||
MESSAGE-9
|
||||
...
|
||||
----
|
||||
|
||||
Reference in New Issue
Block a user