Skip to content

Commit b3e8d26

Browse files
authored
Merge pull request #5 from JoshKCarroll/skip-normal-events
Skip sending EOF or OffsetsCommitted to Events() unless there's an error
2 parents 1ab33c6 + fc3ae47 commit b3e8d26

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

source.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ loop:
101101
case *kafka.Message:
102102
s.handleMsg(e)
103103
case kafka.PartitionEOF:
104-
s.evtChan <- frizzle.Event(e)
104+
// No action required
105+
case kafka.OffsetsCommitted:
106+
// only report if there is an error
107+
if e.Error != nil {
108+
s.evtChan <- frizzle.NewError(e.Error.Error())
109+
}
105110
case kafka.Error:
106111
s.evtChan <- frizzle.Event(e)
107112
default:

0 commit comments

Comments
 (0)