aboutsummaryrefslogtreecommitdiff
path: root/hello_world.py
diff options
context:
space:
mode:
authorCody Hiar <cody@hiar.ca>2022-05-09 13:50:59 -0600
committerCody Hiar <cody@hiar.ca>2022-05-09 13:50:59 -0600
commit01e5310b3d82591f813f2933dcd48633da386939 (patch)
tree54de2907b5ec427848620cd5ae8ef119dcb90495 /hello_world.py
Initial CommitHEADmaster
Diffstat (limited to 'hello_world.py')
-rw-r--r--hello_world.py15
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)