$ docker-compose build $ docker-compose up
The greeter application allows you to do the following actions:
GreetRequest
message to the person
functionIn order to send messages to the Stateful Functions application you can run:
$ curl -X PUT -H "Content-Type: application/vnd.example/GreetRequest" -d '{"name": "Bob"}' localhost:8090/example/person/Bob
To consume the customized greeting, as they appear in the greetings
playground topic, run in a separate terminal:
$ curl -X GET localhost:8091/greetings
The messages are expected to be encoded as JSON.
GreetRequest
: {"name": "Bob"}
, name
is the id of the person
functionFeeling curious? add the following print to the person
function at functions.py:
print(f"Hello there {context.address.id}!", flush=True)
Then, rebuild and restart only the functions
service.
docker-compose build functions docker-compose up functions