ydb-go-sdk icon indicating copy to clipboard operation
ydb-go-sdk copied to clipboard

feat: Callback interface for topic reader

Open rekby opened this issue 8 months ago • 0 comments

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 avatar Jun 10 '24 14:06 rekby