NServiceBus: How to get a reference to Bus if not using the generic host -


i trying create set of services send messages each other using nservicebus/msmq. doing no xml configuration whatsoever, , not planning on using nservicebus generic host (too "black magic" marker interfaces, profiles, containers , other crazy configuration options).

all want have configuration straightforward, , contained in "main()" , able call bus.publish() in loop or something. have got working except don't know how reference bus.

can tell me how that? thanks! :)

try this:

var bus = nservicebus.configure.with()   .defaultbuilder()   .xmlserializer()   .msmqtransport()   .unicastbus()   .createbus()   .start();  bus.send(new whatevermessage()); 

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -