Comments (5)
Thanks @luos!
@msaraiva I think for now we can leave this issue open and we will work on it once we have more use cases + feedback.
from broadway_rabbitmq.
Hi,
The redelivered flag provides you the information that the message was sent out at least once, but it doesn't provide you if it was actually processed. For example when you view a message on the management interface it is marked as redelivered, so you can't just throw away every redelivered message. If you are having distributed consumers it may be harder to agree on what was actually processed than processing the message again, if that makes sense. You can put a unique id into each message to keep track of the message and record if the processing finished or not.
from broadway_rabbitmq.
Hi @luos!
Thanks! That was very helpful. It looks like handling duplicated messages will add a lot of complexity to Broadway, especially due to the possibility that the message can be redelivered to another distributed consumer. So I believe we should keep this out of Broadway's scope. However, I think we should provide a way to allow the user to implement his own solution when necessary. One idea would be to define a handle_unacknowledged_message
callback. @josevalim WDYT?
from broadway_rabbitmq.
Btw, I think this is no longer relevant now that we metadata. With metadata, we can expose the redelivered flag to users and then they can act accordingly, isn't this correct?
from broadway_rabbitmq.
What about adding some option called delivery_method
? With values :at_most_once
, :at_least_once
. In case someone doesn't want to or doesn't know how to use metadata.
edit: Sorry, just noticed this has already been considered. #37
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.