Skip to main content

Message broker

warning

This feature is to be deprecated and replaced by new functionality.

The Message Broker is an internal component (via the ACAP Native SDK) that enables efficient communication between applications on the same device. It uses a publish/subscribe pattern to eliminate direct coupling between different processes, making it easier to exchange data without introducing build-time dependencies. Although it may soon be deprecated, it remains a valuable tool for applications built on Axis devices.

Core concepts

  • Producers: Applications that create one or more “channels” to publish messages.
  • Subscribers: Applications that listen for messages on specified topics and sources.
  • Topics: Textual identifiers that group messages (e.g., “com.axis.analytics_scene_description.v0.beta”).
  • Sources: Subdivisions of a topic that help organize messages (for example, each camera's video stream can be a different source).

How it works

  1. Channel Creation: A producer defines a channel by specifying a topic and an optional source. The combination of topic + source uniquely identifies the channel.
  2. Message Publication: Producers publish data (payload) to the channel.
  3. Subscription: A subscriber “listens” to a topic (and optionally a source) and receives messages published on matching channels.
  4. On-Demand Production: Producers can enable or disable message generation based on whether consumers are actively subscribed, optimizing resource usage.

Interacting via libmdb

Applications communicate with the Message Broker through a C API called libmdb. This library provides functions for creating channels, publishing messages, subscribing to topics and sources, and managing message flows.

For more information, see Message Broker documentation.

Available topic

  • com.axis.analytics_scene_description.v0.beta: Provides data produced by the Fusion Tracker module.
  • com.axis.consolidated_track.v1.beta: Provides data produced by the Track Summary module.

Remember to also set the source parameter in addition to topic when subscribing!