Upgrading NserviceBus 6 to 7 ( UnicastBusConfig from an IConfigurationSource)


(AK) #1

This is my configuration in app.config
UnicastBusConfig DistributorControlAddress=“xxxx.Distributor.Control@xxxxx”
DistributorDataAddress=“xxx@xxx”
MessageEndpointMappings
add Messages=“XXXX.Messages.Message, XXX.ShipmentPublisher”
MessageEndpointMappings
/UnicastBusConfig

to
var routing = transport.Routing();
routing.RouteToEndpoint(
assembly: typeof(AcceptOrder).Assembly,
destination: “Sales”);

what will be assembly,@namespace and destination ?


(Szymon Pobiega) #2

Hi

The assembly, namespace and destination parameters of RouteToEndpoint are equivalent to the MessageEndpointMapping attributes e.g.

routing.RouteToEndpoint(
    assembly: typeof(AcceptOrder).Assembly,
    @namespace: "SomeNamespace",
    destination: "Sales");

is equivalent to:

<MessageEndpointMappings>
      <add Assembly="MyMessages"
           Namespace="SomeNamespace"
           Endpoint="Sales" />
</MessageEndpointMappings>

assuming AcceptOrder message is defined in the MyMessages assembly.

Hope it helps,
Szymon


(AK) #3

This post really helpful.
Thank you!