aboutsummaryrefslogtreecommitdiff
path: root/setup/jetstream/helpers.go
blob: 2d5632269610e4e7daf6e52d77f7c19454032bff (plain)
1
2
3
4
5
6
7
8
9
10
11
package jetstream

import "github.com/nats-io/nats.go"

func WithJetStreamMessage(msg *nats.Msg, f func(msg *nats.Msg) bool) {
	if f(msg) {
		_ = msg.Ack()
	} else {
		_ = msg.Nak()
	}
}