Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sample of registering routing dispatcher with custom quarantine (Lokad.CQRS v2.0)
m.AddAzureProcess(config, IdFor.Publish, p =>
(c, a, x) =>
// provided by the bus
var registry = c.Resolve<QueueWriterRegistry>();
var streamer = c.Resolve<IEnvelopeStreamer>();
// not provided by bus in v2.0
var tapeWriter = c.Resolve<ITapeWriter>();
// see for an example
return new RoutingDispatcher(config.AccountName, registry, streamer, tapeWriter);
// optional but recommended, see for an example of this
p.Quarantine(c => new MailQuarantine(mail, c.Resolve<IStreamingRoot>()));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment