Code Monkey home page Code Monkey logo

Comments (4)

josevalim avatar josevalim commented on July 17, 2024

I would honestly prefer Option #1. Maybe call it after_connect to mirror DBConnection?

from broadway_rabbitmq.

whatyouhide avatar whatyouhide commented on July 17, 2024

If we go with #1, let's absolutely call it after_connect, awesome suggestion.

Personally I'm more inclined to go with #2 though even if I didn't express preference (not avoid pushing the needle 😄). #2 is more declarative plus you don't have to deal with failure manually since we can deal with that in the options. I'd go with :declare_exchanges and with "Option 2" in the exchange-to-exchange bindings though.

FWIW, I see the point of being generic with after_connect, but I don't think you'd do anything that is not declaring exchanges or binding exchanges together. Can you think of other use cases for after_connect that maybe I'm missing?

from broadway_rabbitmq.

josevalim avatar josevalim commented on July 17, 2024

I am not sure if #1 would be used for other cases but at the same time I am not sure if #2 would cover all cases. What if the exchange is coming from an environemnt variable? Now we have to make it a MFA and etc. What if there are other topologies? I think at some point we need to say "it is in your hands now" and it is an arbitrary line but it seems starting with the base case is a safer bet here. :)

from broadway_rabbitmq.

whatyouhide avatar whatyouhide commented on July 17, 2024

@josevalim you have a point and the thing that is bringing me over the line anyways is that we can always add support for the declarative way in the future if we wanted to. I'll make a PR for this.

from broadway_rabbitmq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.