|
|
@ -72,7 +72,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ |
|
|
|
.Or<BrokerUnreachableException>() |
|
|
|
.WaitAndRetry(_retryCount, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)), (ex, time) => |
|
|
|
{ |
|
|
|
_logger.LogWarning(ex.ToString()); |
|
|
|
_logger.LogWarning(ex, "RabbitMQ Client could not connect after {TimeOut}s ({ExceptionMessage})", $"{time.TotalSeconds:n1}", ex.Message); |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
@ -88,7 +88,7 @@ namespace Microsoft.eShopOnContainers.BuildingBlocks.EventBusRabbitMQ |
|
|
|
_connection.CallbackException += OnCallbackException; |
|
|
|
_connection.ConnectionBlocked += OnConnectionBlocked; |
|
|
|
|
|
|
|
_logger.LogInformation($"RabbitMQ persistent connection acquired a connection {_connection.Endpoint.HostName} and is subscribed to failure events"); |
|
|
|
_logger.LogInformation("RabbitMQ acquired a persistent connection to '{HostName}' and is subscribed to failure events", _connection.Endpoint.HostName); |
|
|
|
|
|
|
|
return true; |
|
|
|
} |
|
|
|