From 7f29a04ba764a92a25e82e2848a30ca284c9ff18 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 7 Jun 2020 10:56:16 +0200 Subject: [PATCH] =?utf8?q?streams=20-=20=C3=9Cbungen=20-=20Microservices?= =?utf8?q?=20-=20Schritt=2001=20--=20Beispiele=20f=C3=BCr=20Order-Requests?= =?utf8?q?=20hinhzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit (Der Accept-Header ist sinnvoll, weil sich verschiedene Versionen von httpie-Versionen sonst nicht einheitlich verhalten) --- README.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.sh b/README.sh index 2b528ce..6c3eba1 100755 --- a/README.sh +++ b/README.sh @@ -7,6 +7,8 @@ then exit fi +trap 'kill $(jobs -p)' EXIT + mvn package docker build -t trion/take-order-service:0 take-order @@ -18,3 +20,11 @@ while ! [[ $(zookeeper-shell zookeeper:2181 ls /brokers/ids 2> /dev/null) =~ 100 kafka-topics --zookeeper zookeeper:2181 --if-not-exists --create --replication-factor 1 --partitions 5 --topic orders docker-compose up -d take-order + +kafka-avro-console-consumer --bootstrap-server kafka:9092 --topic orders & +sleep 10 # TODO: Warum ist /health nicht erreichbar?!? +http -v post 0:8091/orders Accept:*/* id=1 customerId=2 productId=234 quantity=5 +http -v post 0:8091/orders Accept:*/* id=1 customerId=2 productId=234 quantity= +http -v post 0:8091/orders Accept:*/* id=1 customerId=2 productId=234 quantity=-5 +http -v post 0:8091/orders Accept:*/* id=1 customerId=2 productId=-234 quantiyt=5 +http -v post 0:8091/orders Accept:*/* customerId=2 productId=234 quantity=5 -- 2.20.1