Git Product home page Git Product logo

Comments (4)

ask avatar ask commented on September 28, 2024

Backend.reject does not take requeue argument, that's what Backend.requeue is
for. Closed by 0349010. Thanks to gregoirecachet

from carrot.

gcachet avatar gcachet commented on September 28, 2024

Thanks for the fix. I'm using RabbitMQ, but the rejects aren't working. It seems like they aren't implemented yet and they throw an exception. Can you confirm? (I guessed you are using RabbitMQ from the README).

from carrot.

ask avatar ask commented on September 28, 2024

Yeah, seems so: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2009-January/003183.html

Come to think about it, I don't have a real need for reject(), as any place I do use reject() there is an error that is basically unrecoverable. Even in the README example, in which if the data is malformed, it means either that the user didn't send the right message data format, or a message was routed to the wrong place. So I think I'll rather raise an exception there than use message.reject().

from carrot.

gcachet avatar gcachet commented on September 28, 2024

I think there are 2 types of errors :
1/ a temporary error (for example, the db transaction can't be committed for concurrency issues) and the message should be resent later.
2/ a permanent error (bug in the code or in data format that happens every time). You won't get anything (unless you upgrade the consumer application) if you retry, so throw an error and drop the message from the queue.

reject() is good for the first kind of errors. But I can log them and deal with them by hand right now.

from carrot.

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.