A publish-subscribe messaging model is built around the concepts of topics, publishers, and subscribers. Data messages are sent to a topic by a publisher (sender), then received by one or more subscribers (receivers) of that topic. This model has a one-to-many relationship. Publishers and subscribers operate independently of each other, and they do not need to know anything about each other.
- A nondurable subscriber only gets messages that are published while it is connected.
- A durable subscriber gets all the messages that are published, including the ones published while it is disconnected.