Module message_publisher

Module message_publisher 

Source
Expand description

Generic publish/subscribe class that can dispatch any kind of message to a subscribed list of dispatchers.

Dispatchers subscribe to a single message format of any type. This is a generalized version of the simple publish-subscribe class in system::Publisher.

Message Subsystem also enables the creation of new message subsystems, adding new dispatchers and clearing inactive channels.

Message Subsystem maintains a list of dispatchers, which is a generalized version of a publisher. Pub-sub is called on dispatchers through the functions subscribe and notify. Whereas system::Publisher only allows messages of a single type, dispatchers can handle any kind of message. This generic message is called a payload and is processed and decoded by the Message Dispatcher.

The Message Dispatcher is a class of publishers that implement a generic trait called Message Dispatcher Interface, which allows us to process any kind of payload as a message.

Structsยง

MessageDispatcher ๐Ÿ”’
A dispatcher that is unique to every Message.
MessageSubscription
Handles message subscriptions through a subscription ID and a receiver channel.
MessageSubsystem
Generic publish/subscribe class that maintains a list of dispatchers.

Traitsยง

MessageDispatcherInterface ๐Ÿ”’
Generic interface for the message dispatcher.

Type Aliasesยง

DispatcherSubscriptionsMap ๐Ÿ”’
Dispatcher subscriptions HashMap type.
MessageResult ๐Ÿ”’
MessageSubscriptionId
64-bit identifier for message subscription.