Giter VIP home page Giter VIP logo

Comments (4)

lewisjkl avatar lewisjkl commented on August 15, 2024 1

Yeah, it seems like the benefit of changing it to be CommitRecovery[F[_]] will cause more difficulty in working with the API than it is worth. I agree that it should stay as-is, at least for now 🙂

from fs2-kafka.

lewisjkl avatar lewisjkl commented on August 15, 2024

I’ll take a look at this!

from fs2-kafka.

lewisjkl avatar lewisjkl commented on August 15, 2024

I may be missing something here, but it seems like this change is going to cause both Jitter and Timer to be required by all callers of CommitRecovery#Default.

def Default[F[_]](
    implicit F: MonadError[F, Throwable],
    jitter: Jitter[F],
    timer: Timer[F]
  ): CommitRecovery[F]

This is assuming that the new CommitRecovery looks like:

abstract class CommitRecovery[F[_]] {
  def recoverCommitWith(
    offsets: Map[TopicPartition, OffsetAndMetadata],
    commit: F[Unit]
  ): Throwable => F[Unit]
}

Do we think it is alright to "leak" Jitter and Timer around the codebase? Or is there another way you had in mind for doing this?

from fs2-kafka.

vlovgr avatar vlovgr commented on August 15, 2024

Thanks for taking a look at this @lewisjkl! The default CommitRecovery would only really be used in ConsumerSettings, where a default Jitter instance could be created. I think we can't get away from ConsumerSettings requiring Timer though, even though it might not be used (as is the case when a custom CommitRecovery is used). Sounds like maybe we should let it stay as-is. WDYT?

from fs2-kafka.

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.