From 01e5310b3d82591f813f2933dcd48633da386939 Mon Sep 17 00:00:00 2001 From: Cody Hiar Date: Mon, 9 May 2022 13:50:59 -0600 Subject: Initial Commit --- hello_world.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 hello_world.py (limited to 'hello_world.py') diff --git a/hello_world.py b/hello_world.py new file mode 100644 index 0000000..bf91499 --- /dev/null +++ b/hello_world.py @@ -0,0 +1,15 @@ +"""Use Faust to read data.""" +import faust + +app = faust.App( + 'hello-world', + broker='kafka://kafka:9092', + value_serializer='raw', +) + +test_topic = app.topic('topic_test') + +@app.agent(test_topic) +async def greet(counters): + async for counter in counters: + print(counter) -- cgit v1.2.3