Particular/NServiceBus — pull request #2558 by johnsimons (2014-11-05 08:26:40+00:00)
Title: Adding an explicit configuration API for users to set the host identifier

This is another take on #2529.

This attempts tries to simplify even further the API to set the default host identifier.

Here is the proposed new API for end users:
```c#
busConfiguration.UniquelyIdentifyRunningInstance()
.UsingNames(instanceName, hostName);
// or
busConfiguration.UniquelyIdentifyRunningInstance()
UsingCustomIdentifier(hostId);
```

Here is how Azure would override the default host information:
```c#
public class MyFeatureThatOverridesHostInformationDefaults : Feature
{
public MyFeatureThatOverridesHostInformationDefaults()
{
EnableByDefault();
DependsOn("UnicastBus");
Defaults(s =>
{
s.SetDefault("NServiceBus.HostInformation.HostId", hostId);
s.SetDefault("NServiceBus.HostInformation.DisplayName", instanceName);
s.SetDefault("NServiceBus.HostInformation.Properties", new Dictionary
{
{"RoleName", "My role name"},
{"RoleInstanceId", "the role instance id"},
});
});
}

protected override void Setup(FeatureConfigurationContext context)
{
}
}
```