diff options
author | Cody Hiar <cody@hiar.ca> | 2022-05-09 13:50:59 -0600 |
---|---|---|
committer | Cody Hiar <cody@hiar.ca> | 2022-05-09 13:50:59 -0600 |
commit | 01e5310b3d82591f813f2933dcd48633da386939 (patch) | |
tree | 54de2907b5ec427848620cd5ae8ef119dcb90495 /hello_world.py |
Diffstat (limited to 'hello_world.py')
-rw-r--r-- | hello_world.py | 15 |
1 files changed, 15 insertions, 0 deletions
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) |