I'm trying to get a faust agent to cast a message inside a flask view/endpoint, I can't find any example of it and i'm really struggling.
Has anyone tried this successfully? the docs say to use gevent or eventlet as a bridge to asyncio but can't understand how unfortunately
You can try to monkeypatch
your flask application with gevent or eventlet. As far as I know eventlet is the only one which is currently working since the bridge aiogevent is no longer available in pip.
Another approach is to delegate your Flask app to only produce messages with pykafka or kafka-python. In this way you will keep both applications isolated, flask producing and faust consuming. Note that by default faust will try to create topics without internal
flag with 1 replica and internal topics with 8 replicas.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With