.net - How do set IMessageFormatter when using the Send method of IBus in NServiceBus? -


i sending object msmq via nservicebus:

public void sendmessage(availinfo message)  {     var bus = configure.with()           .defaultbuilder()           .log4net()           .usetransport<msmq>()           .xmlserializer()           .unicastbus()           .createbus()           .start(() => configure.instance.forinstallationon<windows>().install());       bus.send(message); } 

everything working fine, except consumer of queue requesting explicitly use activexmessageformatter.

question: how/where set when sending message in snippet above.

thanks in advance!

the nservicebus message formatter supposed used messaging endpoints communicate each other. there 4 built nservicebus: xml (default, not same .net xmlserializer), json, bson, , binary.

the activexmessageformatter system.messaging class , not related formatters above.

it sounds you're trying use nservicebus client api msmq, , that's not is. technically implement own message formatter nservicebus, wouldn't recommend in scenario.

if one-off situation, consider interacting directly msmq via system.messaging namespace in scenario. using transactional message still interact ambient transaction present in message handler.


Comments

Popular posts from this blog

How to logout from a login page in asp.net -

Stack level too deep error after upgrade to rails 3.2 and ruby 1.9.3 -