Skip to content

Commit

Permalink
Merge pull request #117 from kaytu-io/fix-query-map-param
Browse files Browse the repository at this point in the history
fix: add delete message to jq
  • Loading branch information
artaasadi authored Sep 13, 2024
2 parents 8c4a455 + 74484f1 commit fff8217
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/jq/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,15 @@ func (jq *JobQueue) Produce(ctx context.Context, topic string, data []byte, id s

return &pubAck.Sequence, nil
}

func (jq *JobQueue) DeleteMessage(ctx context.Context, streamName string, sequenceNumber uint64) error {
stream, err := jq.js.Stream(ctx, streamName)
if err != nil {
return err
}
err = stream.DeleteMsg(ctx, sequenceNumber)
if err != nil {
return err
}
return nil
}

0 comments on commit fff8217

Please sign in to comment.