aboutsummaryrefslogtreecommitdiff
path: root/hello_world.py
blob: bf9149991647b0bdab81517b9293d08cd2fb5464 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)