NServiceBus: Can it work with NO XML configuration?

I do not want to use any XML configuration. Is it possible to configure NServiceBus without XML configuration? I really want my publisher to be configured for everything in the code, and I want to be able to specify everything from the transport to the serializer to the subscription store explicitly in the code.

+3
source share
1 answer

Yes. take a look at this gist , which has code that needs to be done with a custom configuration source. the default configuration code is used if not used.

usage will be like this:

Configure.With()
    .CustomConfigurationSource(new UserConfigurationSource(
    unicast => {
        // unicast bus setup
    },
    msmq => {
       // msmq setup
    })
 // rest of code
+5
source

Source: https://habr.com/ru/post/1764250/


All Articles