Skip to content

Commit

Permalink
fix: Ack handled messages in pulsar eventsource (#1455)
Browse files Browse the repository at this point in the history
Signed-off-by: Arnar Gauti Ingason <arnarg@fastmail.com>
  • Loading branch information
arnarg authored and whynowy committed Dec 9, 2021
1 parent 29b1182 commit d446437
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eventsources/sources/pulsar/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ consumeMessages:
if err := el.handleOne(msg, dispatch, log); err != nil {
log.Errorw("failed to process a Pulsar event", zap.Error(err))
el.Metrics.EventProcessingFailed(el.GetEventSourceName(), el.GetEventName())
} else {
consumer.Ack(msg.Message)
}
case <-ctx.Done():
consumer.Close()
Expand Down

0 comments on commit d446437

Please sign in to comment.