8
Topic Design
Ery Lee edited this page 2015-04-13 15:29:09 +08:00

Topic Types

static: created when broker started

dynamic: created when subscribed, destroyed when unsubscribed

Direct or wildcard

Direct:

a/b/c/d

wildcard:

a/+/b a/#

SYS Topic

$SYS/#

Process

Create Topic

  1. create trie subtree...
  2. create topic

Subscribe Topic

  1. create topic if not existed
  2. create subscriber

Unsubscribe Topic

  1. remove subscriber
  2. remove topic if no subscribers
  3. remove trie nodes if no topic

Trie Tree