Giter VIP home page Giter VIP logo

Comments (6)

rawkode avatar rawkode commented on July 21, 2024

Hi @sweco-semtne,

Unfortunately it isn't possible at the moment. If @sdball / @objectuser aren't opposed to it, I'd be happy to add an additional start_link to Kaffe.Consumer that allowed a configuration to be passed in, rather than using Kaffe.Consumer.Config

This is a use-case I have too, by the way. For the time being, I've adding my extra consumers directly through :brod

from kaffe.

sdball avatar sdball commented on July 21, 2024

So the only change would be the addition of a start_link(config) function that would call the same start_link_group_subscriber function with the salient pieces? That sounds entirely reasonable to me.

Then you could have several worker declarations, each its own consumer and specialized config. That's a great impact for a minimal code change! 👍

from kaffe.

objectuser avatar objectuser commented on July 21, 2024

@sweco-semtne If you're using Kaffe.Consumer, the solution proposed by @rawkode does sound like an easy win.

I wanted to note that there are two modes of consuming messages in Kaffe and the Kaffe.GroupMemberSupervisor has some advantages discussed here. However, it wouldn't be quite as straight forward to allow it to consume from multiple clusters.

from kaffe.

sweco-semtne avatar sweco-semtne commented on July 21, 2024

Thanks!
Kaffe.GroupMemberSupervisor seems interesting.
How would you setup multiple Kaffe.GroupMemberSupervisor with multiple topics (using the same cluster)?

from kaffe.

objectuser avatar objectuser commented on July 21, 2024

@sweco-semtne The topics list in the consumer config should allow for multiple topics, using only a single GroupMemberSupervisor. It's only if you're trying to use two clusters in the node that Kaffe would need an enhancement:

config :kaffe,
  consumer: [
    heroku_kafka_env: true,
    topics: ["topic1", "topic2"],
    consumer_group: "my-group",
    message_handler: MyHandlerModule,
  ]

Is that answering your question? If you really need two GroupMemberSupervisors, it's a bit tricker, but GroupMemberStartupTest might provide a work-around.

from kaffe.

objectuser avatar objectuser commented on July 21, 2024

Closing stale question.

from kaffe.

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.