Open Lancetnik opened 3 weeks ago
We should support alternative way to consume messages instead of decorator callbacks
I think, iteration should be impelemnet something like this
subscriber = broker.subscriber("test") ... async for msg in subscriber: ...
This functional is pretty close to subscriber.get_one() already exists - https://github.com/airtai/faststream/blob/main/faststream/broker/subscriber/proto.py#L90
subscriber.get_one()
Also, implementation should be close to this method as well - https://github.com/airtai/faststream/blob/main/faststream/nats/subscriber/usecase.py#L369 , but use native underlying libraries iterations everywhere it is possible
We should support alternative way to consume messages instead of decorator callbacks
I think, iteration should be impelemnet something like this
This functional is pretty close to
subscriber.get_one()
already exists - https://github.com/airtai/faststream/blob/main/faststream/broker/subscriber/proto.py#L90Also, implementation should be close to this method as well - https://github.com/airtai/faststream/blob/main/faststream/nats/subscriber/usecase.py#L369 , but use native underlying libraries iterations everywhere it is possible