O'Reilly logo

Mastering Internet of Things by Peter Waher

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Understanding the Publish/Subscribe pattern

The Publish/Subscribe pattern solves the problem of detail, by introducing a new concept: a topic, or a node. A broker is used to distribute messages from publishers to subscribers. Each message that is being published, is published on a given topic (or node). In turn, subscribers let the broker know which topics (or nodes) they are interested in. The broker matches incoming publications with the requests of the subscribers, and forwards messages accordingly. Using such message filtering makes sure participants avoid receiving unnecessary messages. In MQTT, publishers can also be subscribers.

Topics (or nodes) can also be formed into trees, with topics, sub-topics, and so on. This allows for a great ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required