using System; namespace Wayne.Lib.MessageBus { /// /// Wayne internal message bus. Topic-based publish and subscription. /// Topic is a string with "/". When subscribing it is possible to enter "*" on a position, /// so for example topic filter "A/*/C" will match topic "A/B/C", "A/C/C" etc. /// public interface IBus { /// /// Publish a message on the bus. /// /// /// void Publish(string topic, object message); /// /// Subscribe to the bus. /// /// /// /// /// A disposable object that is should be disposed when subscription should be ended. IDisposable Subscribe(string topicFilter, Action action); } }