Welcome to the Message Bus

Message Bus is a component provided from SecretNest.info, providing publishing subscription model support within one app.

Message Bus

Message Bus is a component providing publishing subscription model support within one app.

Message Bus supports:

  • Publisher with and without return value. Default return value.

  • Subscriber with one parameter, with and without return value.

  • Parameter conversion.

  • Return value conversion.

  • Async and sync methods calling.

  • Getting result value and source of current executing in subscribers and publisher.

Message Bus supports generics when registering but does not use type for matching. Publishers and subscribers are grouped by message name only. Explicit conversions are taken while calling subscribers and returning to publisher.

Getting Started

To use Message Bus for publishing subscription model, 5 steps need to be done.

  1. Creates an instance of MessageBus.

  2. Names a message.

  3. Registers publisher with the name specified into the instance of MessageBus.

  4. Registers subscriber with the name specified, or use other name matching mode complying the name specified, into the instance of MessageBus.

  5. Runs the publisher.

Standards

Message Bus follows the netstandard 1.3 and can be used with many common framework versions, including .NET / .NET Core since 1.0, .NET Framework / Mono since 4.6, multiple Xamarin releases, UWP 10 and Unity 2018.1.

License: MIT

Copyright: SecretNest.info / Allen Cui

Nuget Packages

SecretNest.MessageBus.Abstractions: Abstractions for Message Bus from SecretNest.info. Imports this package when composing a component intended to be used to connect to Message Bus but do not hold the instance of the Message Bus itself. When the project contains the instance of Message Bus itself, imports SecretNest.MessageBus directly.

SecretNest.MessageBus: Provides publishing subscription model support within one app. Imports this package when composing an app managing the instance of Message Bus. This package references SecretNest.MessageBus.Abstractions.

See Also

Other Resources