Skip to content

Commit

Permalink
Merge pull request #2602 from Particular/msmq-machine-name
Browse files Browse the repository at this point in the history
Remove machine name when using logical queues
  • Loading branch information
WilliamBZA authored Aug 2, 2021
2 parents c7a496b + d88e80d commit 1cc2e83
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/ServiceControl.Audit/Infrastructure/NServiceBusFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,15 @@ public static void Configure(Settings.Settings settings, TransportCustomization
//DisablePublishing API is available only on TransportExtensions for transports that implement IMessageDrivenPubSub so we need to set settings directly
configuration.GetSettings().Set("NServiceBus.PublishSubscribe.EnablePublishing", false);

var serviceControlLogicalQueue = settings.ServiceControlQueueAddress;
if (serviceControlLogicalQueue.IndexOf("@") >= 0)
{
serviceControlLogicalQueue = serviceControlLogicalQueue.Substring(0, serviceControlLogicalQueue.IndexOf("@"));
}

var routing = new RoutingSettings(configuration.GetSettings());
routing.RouteToEndpoint(typeof(RegisterNewEndpoint), settings.ServiceControlQueueAddress);
routing.RouteToEndpoint(typeof(MarkMessageFailureResolvedByRetry), settings.ServiceControlQueueAddress);
routing.RouteToEndpoint(typeof(RegisterNewEndpoint), serviceControlLogicalQueue);
routing.RouteToEndpoint(typeof(MarkMessageFailureResolvedByRetry), serviceControlLogicalQueue);

configuration.GetSettings().Set(loggingSettings);
configuration.SetDiagnosticsPath(loggingSettings.LogPath);
Expand Down

0 comments on commit 1cc2e83

Please sign in to comment.