Upgrading NserviceBus 6 to 7 ( UnicastBusConfig from an IConfigurationSource)

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 ?

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

This post really helpful.
Thank you!