Skip to content

Commit

Permalink
Merge pull request #13 from libercapital/fix/sent
Browse files Browse the repository at this point in the history
fix(replication): set message as sent when listen from replication slot
lcnssantos1 authored Nov 27, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents d33d738 + ad52507 commit 63e2b2b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client.go
Original file line number Diff line number Diff line change
@@ -227,6 +227,7 @@ func (c *client) Subscribe(ctx context.Context) error {
liberlogger.Error(ctx, errors.Wrap(err, "error to process message")).Send()
continue
}

}

}
@@ -271,6 +272,12 @@ func (c *client) processMessage(ctx context.Context, xLogData pglogrepl.XLogData
return errors.Wrap(err, "failed to publish message")
}

err = c.setOutboxMessageAsSent(ctx, int64(values["id"].(int)))

if err != nil {
return errors.Wrap(err, "failed to set outbox message as sent")
}

return nil
}

0 comments on commit 63e2b2b

Please sign in to comment.