# Subject-based Messaging Fundamentally NATS is about publishing and listening for messages. Both of these depend heavily on _Subjects_ which scope messages into streams or topics. At its simplest, a subject is just a string of characters that form a name the publisher and subscriber can used to find each other.
digraph g {
rankdir=LR
publisher [shape=box, style="rounded", label="PUB time.us"];
subject [shape=circle, label="gnatsd"];
sub1 [shape=box, style="rounded", label="SUB time.us"];
sub2 [shape=box, style="rounded", label="SUB time.us"];
publisher -> subject [label="msg"];
subject -> sub1 [label="msg"];
subject -> sub2 [label="msg"];
}
digraph g {
rankdir=LR
publisher [shape=box, style="rounded", label="PUB time.us.east"];
subject [shape=circle, label="gnatsd"];
sub1 [shape=box, style="rounded", label="SUB time.*.east"];
sub2 [shape=box, style="rounded", label="SUB time.us.east"];
publisher -> subject [label="msg"];
subject -> sub1 [label="msg"];
subject -> sub2 [label="msg"];
}
digraph g {
rankdir=LR
publisher [shape=box, style="rounded", label="PUB time.us.east.atlanta"];
subject [shape=circle, label="gnatsd"];
sub1 [shape=box, style="rounded", label="SUB time.us.east.atlanta"];
sub2 [shape=box, style="rounded", label="SUB time.us.*"];
sub3 [shape=box, style="rounded", label="SUB time.us.>"];
publisher -> subject [label="msg"];
subject -> sub2 [style="invis"];
subject -> sub1 [label="msg"];
subject -> sub3 [label="msg"];
}