NServiceBus: How do I get a subscriber to start processing messing without using generic host? -
i modifying pubsub sample, , have been playing around configuration of nservicebus. currently, endpointconfig.cs file has configuration this:
configure.with(new[] { typeof(ievent), typeof(nservicebus.unicast.transport.completionmessage) }) .customconfigurationsource(new userconfigurationsource() .register(() => new msmqtransportconfig { inputqueue = "subscriber2inputqueue", errorqueue = "error", numberofworkerthreads = 1, maxretries = 5 })) .defaultbuilder() .xmlserializer() .msmqtransport() .istransactional(true);
now want change console app without generic host. here's changed:
- changed project output console app
- changed startup settings not invoke generic host
moved configuration above main method this:
configure.with(new[] { typeof(ievent), typeof(nservicebus.unicast.transport.completionmessage) }) .customconfigurationsource(new userconfigurationsource() .register(() => new msmqtransportconfig { inputqueue = "subscriber2inputqueue", errorqueue = "error", numberofworkerthreads = 1, maxretries = 5 })) .defaultbuilder() .xmlserializer() .msmqtransport() .istransactional(true);
console.readline();
is there else should doing "startup" subscriber read messages?
look @ async pages sample see how self-host nservicebus (like in iis). you're missing .unicastbus().loadmessagehandlers().start().
Comments
Post a Comment