title: Setting NServiceBus Endpoint Name / Input Queue when self-hosting
body: <p>I am Trying to <strong>self-host</strong> a Distributor in an existing windows service.
  I am using MSMQ Transport, The following is how the bus is being created:</p>
  
  <pre><code>NServiceBus.Configure.With()
  .DefaultBuilder()
  .EnlistWithDistributor()
  .JsonSerializer()
  .UseTransport&lt;Msmq&gt;()
  .UnicastBus()
  .CreateBus()
  .Start();
  </code></pre>
  
  <p>I need to override the default Queue name ( automatically derived from the Assembly namespace ), I was trying to define an EndPointConfig in the following way, Unfortunetly, it didn't made the Q name change.</p>
  
  <pre><code>[NServiceBus.EndpointName("custon.queue.name")]
  public class EndpointConfig : NServiceBus.IConfigureThisEndpoint, NServiceBus.AsA_Publisher 
  {
      public EndpointConfig()
      {
      }
  }
  </code></pre>
  
  <p><strong>Config section</strong></p>
  
  <hr>
  
  <pre><code>  &lt;configSections&gt;
      &lt;section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core"/&gt;
      &lt;section name="AuditConfig" type="NServiceBus.Config.AuditConfig, NServiceBus.Core"/&gt;
      &lt;section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core"/&gt;
      &lt;section name="TransportConfig" type="NServiceBus.Config.TransportConfig, NServiceBus.Core"/&gt;
    &lt;/configSections&gt;
    &lt;AuditConfig QueueName="audit"/&gt;
    &lt;MessageForwardingInCaseOfFaultConfig ErrorQueue="error"/&gt;
    &lt;TransportConfig MaximumConcurrencyLevel="10" MaxRetries="3" MaximumMessageThroughputPerSecond="10"/&gt;
    &lt;UnicastBusConfig&gt;
      &lt;MessageEndpointMappings&gt;
        &lt;add Messages="Protocols" Endpoint="custom.queue.name@localhost"/&gt;
      &lt;/MessageEndpointMappings&gt;
    &lt;/UnicastBusConfig&gt;
  </code></pre>
  
  <p><br/>
  <br/>
  <strong>How can I override the name of the Queue used when self-hosting ?</strong>
  <br/>
  Any help will be appreciated.</p>