-
Notifications
You must be signed in to change notification settings - Fork 184
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
Subscriber iterator #2039
base: 0.6.0
Are you sure you want to change the base?
Subscriber iterator #2039
Conversation
async for raw_message in queue_iter: | ||
raw_message = cast("IncomingMessage", raw_message) | ||
|
||
msg: RabbitMessage | None = await process_msg( # type: ignore[assignment] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
process_message return None if only the original message is None.
So, we should return RabbitMessage
everytime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add __aiter__
method to the SubscriberProto
parent as well
Description
Asynchronous generator over aio-pika iterator to implement an iterator for rabbit mq subscriber
Fixes #1881
Type of change
Checklist