AsyncTopic
AsyncTopic is the base interface used to define asynchronous Message Broker topics. It is used by the IMessageBroker to constrain a broadcast to the asynchronous messaging flow and to bind the Topic to the type of BaseMessage it carries.
Topics implement AsyncTopic<T>, where T specifies the message payload accepted by that Topic and must derive from BaseMessage. This association ensures that subscriptions and broadcasts for a Topic use the corresponding message type.
An AsyncTopic is intended to represent a specific event or notification whose subscribers may perform asynchronous work. Subscribers register an AsyncEventCallback for an AsyncTopic and a specific broadcaster. When that broadcaster asynchronously broadcasts the Topic, the IMessageBroker executes all associated callbacks and waits for their Tasks to complete.
Type Parameters
| Type Parameter | T |
|---|---|
| Description | The BaseMessage type associated with the AsyncTopic. This determines the payload type that can be supplied when subscribing to or asynchronously broadcasting the Topic. |
