Coder Social home page Coder Social logo

Review producer API about skafka HOT 4 OPEN

saraiva132 avatar saraiva132 commented on May 29, 2024
Review producer API

from skafka.

Comments (4)

x0ji0d avatar x0ji0d commented on May 29, 2024

What the bulked versions will return if only a subset of records succeeded?

from skafka.

x0ji0d avatar x0ji0d commented on May 29, 2024

Also I like the "FF" versions more because otherwise I think most people will go with sync and don't look for how is it different from produceAsync. And flattening it is not a big deal if you need meta

from skafka.

saraiva132 avatar saraiva132 commented on May 29, 2024

I would say that it the expected behaviour is to either produce all records or fail all records.

I think both variants make sense because:

  • They better express intent
  • They give the user both options

Forcing people to go with double FF creates some confusion to some people, they do not quite understand why it is like it is and they will just flatten anyway. For that, might as well expose a sync method. Async is not that often useful anyway, only if you really want to leverage that ability to "block" waiting for the ack later on in your application.

from skafka.

x0ji0d avatar x0ji0d commented on May 29, 2024

the expected behaviour is to either produce all records or fail all records.

For that you need to go with transactional producer, which I would not expect from plain produce

Async is not that often useful anyway, only if you really want to leverage that ability to "block" waiting for the ack later on in your application

My experience is quite opposite – I don't need to read meta in my app and the only "recovering" action is logging, which does not require blocking

from skafka.

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.