Skip to content

Commit

Permalink
fix panic during pg consumer dispatch error handling (#889)
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia authored Sep 24, 2024
1 parent bfee340 commit 7876a33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/consuming/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (c *PostgresConsumer) processOnce(ctx context.Context, partition int) (int,
dispatchErr = c.dispatcher.Dispatch(context.Background(), event.Method, event.Payload)
if dispatchErr != nil {
// Stop here, all processed events will be removed, and we will start from this one.
c.logger.Log(centrifuge.NewLogEntry(centrifuge.LogLevelError, "error processing consumed event", map[string]any{"error": err.Error(), "method": event.Method}))
c.logger.Log(centrifuge.NewLogEntry(centrifuge.LogLevelError, "error processing consumed event", map[string]any{"error": dispatchErr.Error(), "method": event.Method}))
break
} else {
numProcessedRows++
Expand Down

0 comments on commit 7876a33

Please sign in to comment.