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:

  1. changed project output console app
  2. changed startup settings not invoke generic host
  3. 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

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -