You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using config.UniquelyIdentifyRunningInstance().UsingHostName("MyHost") to override the host name, the ServicePulse Endpoint Heartbeats feature fails to display the overridden host name.
Who's affected
You are affected if your endpoints are set to override the default hostname using UsingHostName.
Root cause
The current implementation overrides the host name but does not override the host display name used by ServiceControl and ServicePulse.
Host name (as obtained from the HostInformation public API) is not changed and always defaults to Environment.MachineName.
One of the places where this is clearly visible is the heartbeats feature. The heartbeat messages carry the wrong value.
Versions
The problem has been discovered in NServiceBus 8.2 but likely exists in all V8 and V9 versions
Steps to reproduce
Override the host name using config.UniquelyIdentifyRunningInstance().UsingHostName("MyHost")
Add the heartbeat plugin
Run the endpoint using the Learning Transport
Observe the Host filed in the heartbeat messages being set to the default value -- Environment.MachineName
Relevant log output
No response
Additional Information
Workarounds
The workaround in V8 is to use the legacy deprecated API:
#pragma warning disable CS0618 // Type or member is obsolete
RuntimeEnvironment.MachineNameAction = () => "MyMachine";
#pragma warning restore CS0618 // Type or member is obsolete
Possible solutions
Additional information
Combined with a bug in the heartbeat state machine handling in ServiceControl this issue leads to an endless loop of heartbeat stopped-heartbeat restored events generated by ServiceControl after one of the monitored endpoints is upgraded from NServiceBus 7 to NServiceBus 8 and re-deployed.
The text was updated successfully, but these errors were encountered:
Symptoms
When using
config.UniquelyIdentifyRunningInstance().UsingHostName("MyHost")
to override the host name, the ServicePulse Endpoint Heartbeats feature fails to display the overridden host name.Who's affected
You are affected if your endpoints are set to override the default hostname using
UsingHostName
.Root cause
The current implementation overrides the host name but does not override the host display name used by ServiceControl and ServicePulse.
Backported to
Description
Overriding the hostname using the API introduced in NServiceBus 8
does not change the host name.
Expected behavior
Host name is set to the desired value.
Actual behavior
Host name (as obtained from the
HostInformation
public API) is not changed and always defaults to Environment.MachineName.One of the places where this is clearly visible is the heartbeats feature. The heartbeat messages carry the wrong value.
Versions
The problem has been discovered in NServiceBus 8.2 but likely exists in all V8 and V9 versions
Steps to reproduce
config.UniquelyIdentifyRunningInstance().UsingHostName("MyHost")
Environment.MachineName
Relevant log output
No response
Additional Information
Workarounds
The workaround in V8 is to use the legacy deprecated API:
Possible solutions
Additional information
Combined with a bug in the heartbeat state machine handling in ServiceControl this issue leads to an endless loop of heartbeat stopped-heartbeat restored events generated by ServiceControl after one of the monitored endpoints is upgraded from NServiceBus 7 to NServiceBus 8 and re-deployed.
The text was updated successfully, but these errors were encountered: