Skip to content

Commit

Permalink
Merge pull request #344 from sarmis/feat/clientprovidedname
Browse files Browse the repository at this point in the history
feat: allow user to define client provided name
  • Loading branch information
catcherwong authored Mar 5, 2022
2 parents f657a7e + 96058ac commit 8b728b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bus/EasyCaching.Bus.RabbitMQ/DefaultRabbitMQBus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ IPooledObjectPolicy<IModel> _objectPolicy
VirtualHost = _options.VirtualHost,
RequestedConnectionTimeout = System.TimeSpan.FromMilliseconds(_options.RequestedConnectionTimeout),
SocketReadTimeout = System.TimeSpan.FromMilliseconds(_options.SocketReadTimeout),
SocketWriteTimeout = System.TimeSpan.FromMilliseconds(_options.SocketWriteTimeout)
SocketWriteTimeout = System.TimeSpan.FromMilliseconds(_options.SocketWriteTimeout),
ClientProvidedName = _options.ClientProvidedName
};

_subConnection = factory.CreateConnection();
Expand Down
5 changes: 5 additions & 0 deletions src/EasyCaching.Core/Configurations/BaseRabbitMQOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,10 @@ public class BaseRabbitMQOptions
/// Gets or sets queue message automatic deletion time (in milliseconds). Default 864000000 ms (10 days).
/// </summary>
public int QueueMessageExpires { get; set; } = 864000000;

/// <summary>
/// Gets or sets the client-provided name for the rabbit connection. Default null (handled by rabbit client)
/// </summary>
public string ClientProvidedName { get; set; }
}
}

0 comments on commit 8b728b9

Please sign in to comment.