aboutsummaryrefslogtreecommitdiff
path: root/hello_world.py
diff options
context:
space:
mode:
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)