mirror of
https://github.com/taigrr/nats.docs
synced 2025-01-18 04:03:23 -08:00
Update seq_num.md
This commit is contained in:
parent
81e5aa9ff7
commit
6ea23abb91
@ -3,20 +3,7 @@
|
||||
A common problem for one-to-many messages is that a message can get lost or dropped due to a network failure. A simple pattern for resolving this situation is to include a sequence id with the message. Receivers can check the sequence id to see if they have missed anything.
|
||||
Sequence numbers combined with heartbeats in the absence of new data form a powerful and resilient pattern to detect loss. Systems that store and persist messages can also solve this problem, but sometimes are overkill for the problem at hand and usually cause additional management and operational cost.
|
||||
|
||||
<div class="graphviz"><code data-viz="dot">
|
||||
digraph nats_pub_sub {
|
||||
rankdir=LR
|
||||
publisher [shape=box, style="rounded", label="Publisher"];
|
||||
subject [shape=circle, label="Subject"];
|
||||
sub [shape=box, style="rounded", label="Subscriber"];
|
||||
|
||||
publisher -> subject [label="updates.1"];
|
||||
publisher -> subject [label="updates.2"];
|
||||
publisher -> subject [label="updates.3"];
|
||||
|
||||
subject -> sub [label="updates.*"];
|
||||
}
|
||||
</code></div>
|
||||

|
||||
|
||||
In order to really leverage sequence ids there are a few things to keep in mind:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user