-
Notifications
You must be signed in to change notification settings - Fork 75
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
Version 2.0 #262
Version 2.0 #262
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #262 +/- ##
=======================================
+ Coverage 84.5% 85.1% +0.6%
=======================================
Files 4 6 +2
Lines 486 425 -61
Branches 92 83 -9
=======================================
- Hits 411 362 -49
+ Misses 47 37 -10
+ Partials 28 26 -2 ☔ View full report in Codecov by Sentry. |
a417c75
to
dd5c23c
Compare
Awesome work. |
Really great to see all the effort put into this 😄 👍 I'll review this weekend as well. :) |
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.
First of all, excellent work on this PR. 👍 It's clearly the result of a thought through process.
Overall, I like the idea of client-wide queue. Seeing the resulting (much simpler) code it looks like a much better design. I also like the idea that our users can build a "distributor" on top of it. It is a breaking change and there will be push back from our 1.x users (that's always the case when you break something). Still, I think we should move forward with it. We gain a lot in terms of maintainability (the client is much simpler now).
I read through all the code but frankly I don't have much to add. Just two nit-picky comments. That's a testament to the quality of your design and implementation. Again, excellent job on that front! 😄
I also like the idea to push all the other changes that we have discussed during the past year to a 3.0 release. This way, we can land the 2.0 release right away.
Lastly, it's great to see that you touch the entire code base: Client, documentation, and tests. It's very well put together and an exemplary PR. 👍
Great work! Everything seems good to me. |
Thank you both for your valuable comments! 😊 There's another thing that I was not 100% sure about, maybe you have some ideas on that: I currently implemented the messages generator as I'm not sure if this is just a question of style or if there are other reasons for or against. I opted for What do you think? |
|
I think it is easiest for our users to have
The above may be surprising to our users. The easiest "work around" is just to write it very explicitly in the documentation. I don't think we should try to solve this routing problem. That's too difficult. |
I agree that we shouldn't implement different routing models, that would probably build back the same complexity we had before 👍 Currently, something like this: import asyncio
import aiomqtt
async def handle(client):
async for message in client.messages:
print(message.payload)
async def main():
client = aiomqtt.Client("test.mosquitto.org")
async with asyncio.TaskGroup() as tg:
async with client:
tg.create_task(handle(client))
tg.create_task(handle(client))
asyncio.run(main()) fails with Thanks for the great feedback! I'll merge and release this then 😊 |
This PR should implement some changes discussed in #226:
filtered_messages
andunfiltered_messages
methodsmessage_retry_set
Client argumentI'm very fond of the idea to switch out
paho
withrumqtt
, but I think that's better suited for a 3.0, otherwise this gets too big. I have too many ideas and too little time 😄Feedback is welcome 😋