connect icon indicating copy to clipboard operation
connect copied to clipboard

Exactly-once delivery via NATS JetStream

Open torimcc opened this issue 4 years ago • 2 comments

Implement and refine a double-ack for exactly-once delivery. Create a JetStream Consumer for every LinuxForHealth sync target (NATS sync subscriber).

torimcc avatar Apr 19 '21 21:04 torimcc

The implementation needs in-progress changes to nats.py, the NATS python client, to support JetStream. Once those changes are in place, we can proceed with the exactly-once implementation.

ccorley avatar Apr 27 '21 13:04 ccorley

To get exactly once semantics, we need the ability to specify the name of the consumer as part of the subscription, so each LFH node can use a different consumer and can thereby separately double-ack the same message. Basically the equivalent of the go example, where the second arg is the name of the consumer to use:

sub, err := js.SubscribeSync("ORDERS.*", nats.Durable("MONITOR"), nats.MaxDeliver(3))

We don't have that js.SubscribeSync for Python yet, but it's coming soon from the NATS team.

ccorley avatar May 10 '21 14:05 ccorley