-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add supervised API #4
Comments
I'll set this task as an epic and create features/tasks |
@arpunk: Would this sort of thing be of interest/help to you? |
@oubiwann Yes, I use this sort of strategy all the time (I work with RabbitMQ on a daily basis). In my experience all the pooling strategies are very opinionated. However these are my ideas:
I currently use GenStage based consumers at work using wabbit and/or custom AMQP wrappers. I tend to wrap very lighly on the standard RabbitMQ Erlang clients. Sometimes I use turtle for simplicity when working on small PoC/MVP in Erlang. |
@arpunk This is great feedback -- thanks! |
@arpunk I'm much happier using this new API in the Compare examples:
After this release, one tedious (to implement) improvement that could be made would be to convert calls like this: (kanin:call
(make-queue.bind
queue example-queue
exchange example-exchange
routing_key example-key)) into this: (kanin:bind-queue
queue example-queue
exchange example-exchange
routing-key example-key) Much better developer experience ... but that's more than I want to tackle right now ;-) |
One of the things I've noticed when working with the Erlang RabbitMQ library is how easy it is to crash a process (usually through a fault of my own, e.g., by calling a function improperly -- wrong types or wrong number of parameters). Regardless, abuse like this results in a bad user/developer experience and makes writing applications that much more finicky.
What I propose we do is provide a unifying API in the
kanin
module that, when started, creates a supervised kanin server that maintains connection options, connection(s), and channel(s) as state and when child processes die, new connections, channels, etc., are created automatically.Furthermore, we could provide a default channel that is used implicitly making the API even easier to use.
Features/tasks:
Part of release v0.7.0
The text was updated successfully, but these errors were encountered: