Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding of Kafka configurations per producer/consumer #1412

Open
jhill072 opened this issue Nov 4, 2021 · 4 comments
Open

Allow overriding of Kafka configurations per producer/consumer #1412

jhill072 opened this issue Nov 4, 2021 · 4 comments
Labels
area/api area/broker Kafka Broker related issues area/channel Kafka Channel related issues area/control-plane area/data-plane kind/feature-request triage/accepted Issues which should be fixed (post-triage)

Comments

@jhill072
Copy link
Contributor

jhill072 commented Nov 4, 2021

Problem
From my understanding, configurations for producers and consumers are determined by a single config map, plus or minus a couple of specific properties such as group.id. I would like to be able to control some more properties on a case-by-case basis, and I'll focus on a specific example: auto.offset.reset. Some of my applications may be fine with receiving the same event multiple times, while others may not be able to (or may not want to) understand past events, but I have to choose exactly one per dispatcher. Since the general operation for updating a Trigger is to recreate the Trigger, this results in a new consumer group (and therefore a new offset).

Another similar option on the producer side would be the acks, where we may want higher throughput at the risk of losing some data.

Persona:
Which persona is this feature for? Event producers and event consumers.

Exit Criteria
I can set a property on a Trigger, SinkBinding, etc. that can change the default behavior of a single producer or consumer.

Time Estimate (optional):
How many developer-days do you think this may take to resolve? Based on my quick look into the code, there are events for new egresses and a map for consumer configs that gets instantiated on each new consumer. I would hope to be able to reference labels, annotations, etc. on the Trigger that can override the properties for that particular consumer. That doesn't seem too difficult to iterate over an incoming egress, but naming conventions and ensuring this doesn't break existing users could mean more discussion points/analysis.

Additional context (optional)

@pierDipi
Copy link
Member

Hi @jhill072 !

This is definitely useful.

What I was thinking is rather than give event producers and event consumers the ability to set every possible producer and consumer configuration directly, what if we have a set of named profiles (with the ability to define your own) where you can group configurations together and every trigger, broker, etc can choose the profile that best fits that use case?

For example:

t1-profile:
  auto.offset.reset=latest
  # ...
t2-profile:
  auto.offset.reset=earliest
  # ...

The output would be the global set of configurations merged with the profile-specific configurations that the resource chooses.

@jhill072
Copy link
Contributor Author

That would be fantastic, as I was planning on using this in basically the same way!

@pierDipi pierDipi moved this to Ready To Work in Eventing Kafka Roadmap Nov 24, 2021
@pierDipi pierDipi moved this from Ready To Work to In Design in Eventing Kafka Roadmap Jan 11, 2022
@pierDipi
Copy link
Member

/triage accepted

This issue depends on #1537 since we're changing the way consumers work and the new model facilitates the implementation of this feature.

@wSedlacek
Copy link

I would be interested in this feature being revisited.
Ultimately I am most interested in replaying events to certain triggers.
It would be fantastic if I could set a specific initial offset like was done in the ResetOffset (which was seemingly removed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api area/broker Kafka Broker related issues area/channel Kafka Channel related issues area/control-plane area/data-plane kind/feature-request triage/accepted Issues which should be fixed (post-triage)
Projects
Status: Icebox / Wishlist
Development

No branches or pull requests

4 participants