# Sequence Numbers 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.
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.*"];
}