Skip to content

Instantly share code, notes, and snippets.

@abdullin
Created June 16, 2011 06:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdullin/1028765 to your computer and use it in GitHub Desktop.
Save abdullin/1028765 to your computer and use it in GitHub Desktop.
An example of registering poison quarantine.
x.Quarantine(c => {
var logRoot = c.Resolve<IStreamingRoot>();
var registry = c.Resolve<QueueWriterRegistry>();
IQueueWriterFactory factory;
if (!registry.TryGet("azure-account-name", out factory))
throw new IOE("Didn't find the specified Azure account. Did you register it in the queue registry?")
// registration is right now, if you don't have it already
// builder.Advanced.RegisterQueueWriterFactory(c => new AzureQueueWriterFactory(account, c.Resolve<IEnvelopeStreamer>()));
return new SampleQuarantine(logging, factory);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment