-
Notifications
You must be signed in to change notification settings - Fork 227
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
rumqttc | Unbounded channel #658
Comments
Hey, can you elaborate more on why client with unlimited channel capacity would be desirable? cuz, the channel getting full means the client isn't able to process the messages right? so having unlimited capacity will eventually just run out of memory. |
I don't know what the channel capacity is a priori. I prefer the client to run out of memory (very rare) rather than to block :/ These are my ideas but I prefer to also listen yours :) |
I do agree with you. I think only change required will be to make Would need to give it a little thought on is it really required/helpful, and worth to break the API. |
Awesome 😎 |
Hey @carlocorradini , lets do it! Would you like to open PR for this? |
@swanandx Yeah 🥳 Unfortunately currently I'm unable to develop on my computer but I'll try in the next weeks 🥳 |
no worries, thank for your contribution 💯 |
API idea: Client::new_bounded(mqttoptions, 10);
Client::new_unbounded(mqttoptions); and deprecate Client::new(...); I think this new API is more self descriptive. What do you think? |
That's a great suggestion, but for now I think e.g. suggested by @de-sh let client = AsyncClient::builder().host("...").port(...).capacity(...).build(); |
At the moment, the only way to construct a client is to provide a fixed client capacity. A client with unlimited channel capacity would be desirable.
Furthermore, the pure implementation is already available because
rumqttc
is built onflume
. The client/event_loop has to be refactored in order to enable support for both bounded and unbounded channels.Let me know what you think 🤯
The text was updated successfully, but these errors were encountered: