Comments (4)
I would honestly prefer Option #1. Maybe call it after_connect
to mirror DBConnection?
from broadway_rabbitmq.
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.
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.
@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)
- Crash supervisor after killing Broadway process HOT 1
- econnrefused when deploying elixir project with broadway HOT 3
- ACK timeout kills connection without getting restarted HOT 4
- Ability to retrieve the AMQP Channel used by the Producer HOT 3
- Any plan for new version release? HOT 2
- Allow use of nimble_options 0.4.0 in broadway_rabbitmq HOT 2
- Retrieving additional information from AMQP.Queue.declare HOT 2
- AMQP 1.0 support HOT 7
- Allow usage of connection/channel pool HOT 6
- Update nimble options requirement HOT 1
- publish new version
- Broadway.prepare_messages/2 callback always receives exactly one message HOT 16
- Pass in an established connection HOT 11
- Proposal: require users to specify `:on_failure` HOT 1
- Questions about supported versions of the AMQP protocol HOT 2
- AMQP 2.0 HOT 3
- Multiple producers is an anti-pattern, right? HOT 12
- Working dead letter example HOT 1
- producers keep failing with declare: [no_wait: true] HOT 5
- :message_count is not honoured as metadata option. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from broadway_rabbitmq.