Skip to content

Instantly share code, notes, and snippets.

View SzymonPobiega's full-sized avatar
🏠
Working from home

Szymon Pobiega SzymonPobiega

🏠
Working from home
View GitHub Profile
var routerConfiguation = new RouterConfiguration("Router");
routerConfiguation.AddInterface<MsmqTransport>("MSMQ", t => {}).DisableMessageDrivenPublishSubscribe();
routerConfiguation.AddInterface<SqlServerTransport>("SQL", t => t.ConnectionString(myConnectionString)).DisableMessageDrivenPublishSubscribe();
routerConfiguation.Chains.AddRule(c => new MetricsPreroutingTerminator("MSMQ", "Particular.Monitoring@some-machine"));
routerConfiguation.UseStaticRoutingProtocol();
var router = Router.Create(routerConfiguation);
await router.Start().ConfigureAwait(false);