update web.sh and README
This commit is contained in:
13
README.adoc
13
README.adoc
@@ -137,7 +137,7 @@ Also, start a RabbitMQ server locally (e.g. execute `rabbitmq-server`).
|
||||
|
||||
----
|
||||
./web.sh -f uppercase -p 9000
|
||||
curl -H "Content-Type: text/plain" -H "Accept: text/plain" :9000/function -d foo
|
||||
curl -H "Content-Type: text/plain" -H "Accept: text/plain" :9000/uppercase -d foo
|
||||
----
|
||||
|
||||
=== Register a Supplier:
|
||||
@@ -150,7 +150,7 @@ curl -H "Content-Type: text/plain" -H "Accept: text/plain" :9000/function -d foo
|
||||
|
||||
----
|
||||
./web.sh -s words -p 9001
|
||||
curl -H "Accept: application/json" :9001/supplier
|
||||
curl -H "Accept: application/json" :9001/words
|
||||
----
|
||||
|
||||
=== Register a Consumer:
|
||||
@@ -163,7 +163,7 @@ curl -H "Accept: application/json" :9001/supplier
|
||||
|
||||
----
|
||||
./web.sh -c print -p 9002
|
||||
curl -X POST -H "Content-Type: text/plain" -d foo :9002/consumer
|
||||
curl -X POST -H "Content-Type: text/plain" -d foo :9002/print
|
||||
----
|
||||
|
||||
=== Run Stream Processing Microservices:
|
||||
@@ -174,12 +174,13 @@ First register a streaming words supplier:
|
||||
./registerSupplier.sh -n wordstream -f "()->Flux.intervalMillis(1000).map(i->\"message-\"+i)"
|
||||
----
|
||||
|
||||
Then start the source (supplier), processor (function), and sink (consumer) apps:
|
||||
Then start the source (supplier), processor (function), and sink (consumer) apps
|
||||
(in reverse order):
|
||||
|
||||
----
|
||||
./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
|
||||
./stream.sh -p 9102 -i words -f uppercase -o uppercaseWords
|
||||
./stream.sh -p 9101 -s wordstream -o words
|
||||
----
|
||||
|
||||
The output will appear in the console of the sink app (one message per second, converted to uppercase):
|
||||
|
||||
@@ -20,7 +20,8 @@ while getopts ":s:f:c:p:" opt; do
|
||||
esac
|
||||
done
|
||||
|
||||
java -jar ../spring-cloud-function-samples/spring-cloud-function-sample-bytecode/target/function-sample-bytecode-1.0.0.BUILD-SNAPSHOT.jar \
|
||||
--function.type=$TYPE \
|
||||
--function.resource=file:///tmp/function-registry/$TYPE's'/$FUNC.fun \
|
||||
--server.port=$PORT
|
||||
java -jar ../spring-cloud-function-samples/spring-cloud-function-sample-compiler/target/function-sample-compiler-1.0.0.BUILD-SNAPSHOT.jar\
|
||||
--spring.cloud.function.proxy.$FUNC.type=$TYPE\
|
||||
--spring.cloud.function.proxy.$FUNC.resource=file:///tmp/function-registry/$TYPE's'/$FUNC.fun\
|
||||
--management.security.enabled=false\
|
||||
--server.port=$PORT
|
||||
|
||||
Reference in New Issue
Block a user