Skip to content
This repository was archived by the owner on Apr 29, 2022. It is now read-only.

Commit 42654d3

Browse files
author
Anton Vorontsov
committed
Made a documentation plus some small fixes.
1 parent e8bfef5 commit 42654d3

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

docs/rabbit-configuration.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ A RabbitMQ client can be configured via a configuration section located in the `
4040
"AutomaticRecoveryEnabled": true,
4141
"TopologyRecoveryEnabled": true,
4242
"RequestedConnectionTimeout": 60000,
43-
"RequestedHeartbeat": 60
43+
"RequestedHeartbeat": 60,
44+
"InitialConnectionRetries": 5,
45+
"InitialConnectionRetryTimeoutMilliseconds": 200
4446
}
4547
}
4648
```
@@ -53,13 +55,15 @@ A RabbitMQ connection can be configured with properties:
5355
- `UserName` - user that connects to the server,
5456
- `Password` - password of the user that connects to the server,
5557
- `ClientProvidedName` - application-specific connection name that will be displayed in the management UI if RabbitMQ server supports it,
56-
- `VirtualHost` - default virtual host,
58+
- `VirtualHost` - the default virtual host,
5759
- `AutomaticRecoveryEnabled` - automatic connection recovery option,
5860
- `TopologyRecoveryEnabled` - topology recovery option,
5961
- `RequestedConnectionTimeout` - timeout for connection attempts,
60-
- `RequestedHeartbeat` - heartbeat timeout.
62+
- `RequestedHeartbeat` - heartbeat timeout,
63+
- `InitialConnectionRetries` - a number of retries which could be attempted while trying to make an initial connection,
64+
- `InitialConnectionRetryTimeoutMilliseconds` - timeout in milliseconds which could be used while trying to make an initial connection.
6165

62-
`ClientProvidedName` is optional and can be null. Options `VirtualHost`, `AutomaticRecoveryEnabled`, `TopologyRecoveryEnabled`, `RequestedConnectionTimeout`, `RequestedHeartbeat` are set with default values, so you can leave them.
66+
`ClientProvidedName` is optional and can be null. Options `VirtualHost`, `AutomaticRecoveryEnabled`, `TopologyRecoveryEnabled`, `RequestedConnectionTimeout`, `RequestedHeartbeat`, `InitialConnectionRetries`, `InitialConnectionRetryTimeoutMilliseconds` are set with default values, so you can leave them.
6367

6468
```json
6569
{

tests/RabbitMQ.Client.Core.DependencyInjection.Tests/IntegrationTests/RabbitMqConnectionFactoryTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,14 +159,14 @@ public void ShouldProperlyCreateInitialConnectionWithHostNamesAndNamedConnection
159159
ExecuteSuccessfulConnectionCreationAndAssertResults(connectionOptions);
160160
}
161161

162-
void ExecuteUnsuccessfulConnectionCreationAndAssertResults(RabbitMqClientOptions connectionOptions)
162+
static void ExecuteUnsuccessfulConnectionCreationAndAssertResults(RabbitMqClientOptions connectionOptions)
163163
{
164164
var connectionFactory = new RabbitMqConnectionFactory();
165165
var exception = Assert.Throws<InitialConnectionException>(() => connectionFactory.CreateRabbitMqConnection(connectionOptions));
166166
Assert.Equal(connectionOptions.InitialConnectionRetries, exception.NumberOfRetries);
167167
}
168168

169-
void ExecuteSuccessfulConnectionCreationAndAssertResults(RabbitMqClientOptions connectionOptions)
169+
static void ExecuteSuccessfulConnectionCreationAndAssertResults(RabbitMqClientOptions connectionOptions)
170170
{
171171
var connectionFactory = new RabbitMqConnectionFactory();
172172
using var connection = connectionFactory.CreateRabbitMqConnection(connectionOptions);

0 commit comments

Comments
 (0)