Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: subscriber iteration support #1881

Open
Lancetnik opened this issue Oct 30, 2024 · 3 comments
Open

Feature: subscriber iteration support #1881

Lancetnik opened this issue Oct 30, 2024 · 3 comments
Assignees
Labels
Core Issues related to core FastStream functionality and affects to all brokers enhancement New feature or request help wanted Extra attention is needed

Comments

@Lancetnik
Copy link
Member

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

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

@Lancetnik Lancetnik added enhancement New feature or request Core Issues related to core FastStream functionality and affects to all brokers labels Oct 30, 2024
@Lancetnik Lancetnik mentioned this issue Oct 30, 2024
63 tasks
@Lancetnik Lancetnik added the help wanted Extra attention is needed label Nov 7, 2024
@dearkafka
Copy link

I would greatly appreciate if this feature would be realised in future

@Lancetnik
Copy link
Member Author

Lancetnik commented Dec 13, 2024

It will be for sure, but I don't know how soon

@Lancetnik Lancetnik moved this to Todo in FastStream Jan 8, 2025
@Lancetnik Lancetnik moved this from Todo to Backlog in FastStream Jan 8, 2025
@Lancetnik Lancetnik moved this from Backlog to In Progress in FastStream Jan 15, 2025
@ApostolFet
Copy link

I've taken this issue to work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issues related to core FastStream functionality and affects to all brokers enhancement New feature or request help wanted Extra attention is needed
Projects
Status: In Progress
Development

No branches or pull requests

3 participants