From 62aecb9c7be91a18eee2bd680c322821426137c1 Mon Sep 17 00:00:00 2001 From: markfisher Date: Tue, 7 Feb 2017 14:16:54 -0500 Subject: [PATCH] update web.sh and README --- README.adoc | 13 +++++++------ scripts/web.sh | 9 +++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/README.adoc b/README.adoc index 5fa486703..6cd07f99c 100644 --- a/README.adoc +++ b/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): diff --git a/scripts/web.sh b/scripts/web.sh index e072d8d1f..ae300db79 100755 --- a/scripts/web.sh +++ b/scripts/web.sh @@ -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