Git Product home page Git Product logo

Comments (5)

wagslane avatar wagslane commented on September 23, 2024 1

Ah! I see. Yeah if you guys want to open a PR for a publishing option that simply sets confirm mode I'm open to it. Under the hood I think it should just set the handler to an empty handler.

from go-rabbitmq.

wagslane avatar wagslane commented on September 23, 2024

I'm not quite following - you want publish confirmations but you don't want to handle them?

from go-rabbitmq.

felixhuettner avatar felixhuettner commented on September 23, 2024

We handle them now using PublishWithDeferredConfirmWithContext and then calling WaitContext on the confirmation

from go-rabbitmq.

wagslane avatar wagslane commented on September 23, 2024

I think the cases where you'd want to set confirm mode, but don't want a handler to deal with those confirmations should be rare... I'm curious, why not just handle the confirmations as they come back across the channel?

from go-rabbitmq.

felixhuettner avatar felixhuettner commented on September 23, 2024

We are publishing the rabbitmq messages during a database transaction. And we only want to commit the transaction once we are completely certain that the message has been published.
Therefor we use PublishWithDeferredConfirmWithContext and then block until the confirmation is received.

And this is a lot simpler with WaitContext than by using a custom handler

from go-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.