A lightweight Peer to Peer Service Bus
BindingKey
contents when serialized to JSONIReporter
interface to IPersistenceReporter
IReporter
interfaceReadOnlyMemory<byte>
instead of Stream
for TransportMessage
content (breaking change)SubscriptionModeAttribute
can now be configured with the type of a custom IStartupSubscriber
. The startup subscriber will be used to create the startup subscriptions for the target message handler.
Complete example:
[SubscriptionMode(typeof(StartupSubscriber))]
public class CustomSubscriptionHandler : IMessageHandler<RoutableEvent>
{
public void Handle(RoutableEvent message)
{
}
public class StartupSubscriber : IStartupSubscriber
{
private readonly IBus _bus;
public StartupSubscriber(IBus bus)
{
_bus = bus;
}
public IEnumerable<BindingKey> GetStartupSubscriptionBindingKeys(Type messageType)
{
if (messageType != typeof(RoutableEvent))
throw new NotSupportedException();
yield return new BindingKey(_bus.PeerId.ToString());
}
}
}
Subscriptions can now match collection members using the following syntax:
var subscription = Subscription.Matching<TestCommand>(x => x.IdArray.Contains(123));
Note that Contains
is the only supported operator for collections.
IBusConfiguration.FaultedDirectoryRetryDelay
(breaking change)