3

I don't want to use any XML configuration. Is it possible to have NServiceBus set up with NO XML configuration? I really want my publisher to be configured all in code, and I want to be able to specify everything from the transport to the serializer to the subscription storate explicitly in code.

1 Answer 1

5

yes. take a look at this gist which has the code to do exactly this via a custom configuration source. it defaults to using config code if either is not used.

usage would be like such:

Configure.With()
    .CustomConfigurationSource(new UserConfigurationSource(
    unicast => {
        // unicast bus setup
    },
    msmq => {
       // msmq setup
    })
 // rest of code
1
  • So is UserConfigurationSource a class you hand-rolled yourself?
    – skb
    Nov 15, 2010 at 18:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.