moneydesktop/action_subscriber — pull request #2 by mmmries (2014-12-17 06:19:30+00:00)
Title: Routing table

Looking for feedback about the direction I'm moving here. I want to get rid of the class level variables that track all of the rabbitmq connection, channels, configuration and queues. I want to replace these class-level variables with instance variables that live inside a separate object so that a set of subscriptions can be started stopped.

This also allows me to create custom routes.

My plan for these changes would include:
* make the subscription set work for both march_hare and bunny (currently only bunny is supported)
* the route object should contain a middleware stack, so we can customize the stack per-route
* handle message acknowledgements (at_most_once! and at_least_once!) via middleware items, instead of calling env.acknowledge and env.reject in the existing middleware objects
* keep the existing code paths working while I work towards a fully functioning SubscriptionSet over the course of multiple pull requests
* deprecate the auto_pop! pattern. Now that we have at_most_once! working with a prefetch, we no longer need to support the old "pounce" mode
* once SubscriptionSet is ready for production use I will change the ActionSubscriber.start_subscribers call so that it builds and starts a subscription set instead of using the existing class-level auto_subscribe! methods
* remove a whole lot of dead code once we no longer need the old code paths

Any and all feedback is welcome here
/cc @quixoten @abrandoned @liveh2o @brianstien