Message Handler
A handler for subscribing to a specific message topic on a MessageBus. It listens for messages published to the specified Topic and processes them using the provided handler function on a new coroutine in the provided CoroutineScope.
Be careful when using shared resources in the handleMessage function. It may run concurrently.
Parameters
The MessageBus instance the handler subscribes to.
The CoroutineScope in which the handler operates.
The Topic that the handler subscribes to for receiving messages.
Function for handling errors that occur during execution of handleMessage. Errors do not cause the flow to complete.
A suspending function invoked for each received message associated with the given topic.
Type Parameters
The type of messages to handle, constrained to non-nullable types.