Code Monkey home page Code Monkey logo

Comments (5)

josevalim avatar josevalim commented on July 17, 2024

Good catch. If prefetch_size is 0, we shouldn't touch buffer_size at all, which will default to 10_000, and also allow users to customize it. WDYT? PR please?

from broadway_rabbitmq.

lackac avatar lackac commented on July 17, 2024

@josevalim sounds good, I'll get to it then. 🙂

from broadway_rabbitmq.

lackac avatar lackac commented on July 17, 2024

I am now getting to this. @josevalim, would you prefer customisation limited to buffer_size or a more general approach where users can override any GenStage producer options like this:

producers: [
  default: [
    module: {
      # ...
      gen_stage: [ buffer_size: 1000, buffer_keep: :first ]
    }
  ]
]

I can see how the two in the example could be useful, but the other two options (:demand, :dispatcher) are less likely to be used as they would mess with the internals.

If we're going with the selective approach, I would put :buffer_size and :buffer_keep at the same level as :qos (so not gen_stage: [buffer_size: 1000]).

from broadway_rabbitmq.

josevalim avatar josevalim commented on July 17, 2024

I would keep them merged for now. Here is what I would do:

  1. if prefetch_count is not 0, we keep the behaviour from today
  2. if prefetch_count is 0, then we aks the user to explicitly set at leasts the buffer_size too

WDYT?

from broadway_rabbitmq.

lackac avatar lackac commented on July 17, 2024

Sounds good.

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.