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

feat: Callback interface for topic reader #1269

Open
rekby opened this issue Jun 10, 2024 · 0 comments
Open

feat: Callback interface for topic reader #1269

rekby opened this issue Jun 10, 2024 · 0 comments
Labels
enhancement New feature or request topic issue for topic service

Comments

@rekby
Copy link
Member

rekby commented Jun 10, 2024

Feature Request

Describe the Feature Request

Available to set callback function as callback for receive new messages. It will allow to easy parallel works


f := func(ctx, batch topicreader.MessageBatch) (action, error){
  return topicreader.ActionCommit, nil
}

reader, err := client.StartReader(ctx, ..., WithCallback(f))

callback f can be called within many goroutines - one goroutine by partition.

it will be mach simpler if need to parallel work.

@rekby rekby added enhancement New feature or request topic issue for topic service labels Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request topic issue for topic service
Projects
None yet
Development

No branches or pull requests

1 participant