Code Monkey home page Code Monkey logo

Comments (5)

josevalim avatar josevalim commented on July 17, 2024 1

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.

luos avatar luos commented on July 17, 2024

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.

msaraiva avatar msaraiva commented on July 17, 2024

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.

josevalim avatar josevalim commented on July 17, 2024

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.

laszloesl avatar laszloesl commented on July 17, 2024

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)

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.