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

Feature: Support automated offset management with external processing #4284

Open
sehz opened this issue Dec 5, 2024 · 0 comments
Open

Feature: Support automated offset management with external processing #4284

sehz opened this issue Dec 5, 2024 · 0 comments

Comments

@sehz
Copy link
Contributor

sehz commented Dec 5, 2024

To build high performance sink connector, connector needs to bulk commit records to sink after successfully commits to external data sink. This should be supported by automated batch offset.

It would be good have something like:

let consumer = let config = ConsumerConfigExtBuilder::default()
       .topic(TOPIC_NAME)
       .partition(PARTITION_NUM)
       .post_process(MyPostProcesser::new(), OffsetError:default)

MyPostProcessor will implement consumer trait that is sort of callback to control lifecycle:

pub trait ConsumerLifecycle {

       // there is default implementation, not need to override  
       async fn process_batch(&self, batch: BatchRecord) -> Result<()>

       async fn process_record(&self);
}


The Offset management will take care of offset in case of error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant