NServiceBus: Message handler types not loading correctly when configuring via code -
after changing subscriber2 project in pubsub sample, getting error when message received subscriber:
error nservicebus.unicast.transport.msmq.msmqtransport [(null)] <(null)> - not extract message data. system.typeloadexception: not handle type 'mymessages.eventmessage'.
i changed endpointconfig.cs file this:
using nservicebus; namespace subscriber2 { public class endpointconfig : iconfigurethisendpoint, asa_server, iwantcustominitialization { public void init() { configure.with(new[] { typeof(eventmessagehandler), typeof(nservicebus.unicast.transport.completionmessage) }) .defaultbuilder() .xmlserializer() .unicastbus() .donotautosubscribe(); } } }
does know why doesn't work?
you did not specify message type in list. if use overload of with() have supply types. recommend pointing specific assembly instead , letting nsb scan correct types. alternatively nothing , let scan bin directory.
Comments
Post a Comment