Skip to content

Commit

Permalink
chore: make kafka client error as io error (#2338)
Browse files Browse the repository at this point in the history
Signed-off-by: yisaer <[email protected]>
  • Loading branch information
Yisaer authored Oct 20, 2023
1 parent 5b51fb1 commit 4aa306c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions extensions/sinks/kafka/ext/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ func (m *kafkaSink) Collect(ctx api.StreamContext, item interface{}) error {
count++
continue
}
default:
if strings.Contains(err.Error(), "kafka.(*Client).Produce:") {
return fmt.Errorf(`%s: kafka sink fails to send out the data . %v`, errorx.IOErr, err)
}
}
}
if count > 0 {
Expand Down

0 comments on commit 4aa306c

Please sign in to comment.