Skip to content

Significantly Improve the Configuration API for Pools and Connections

Nathan Harris requested to merge configuration-improvements into master

Motivation

The API for establishing the configuration of a connection pool had a lot of jargon and properties that developers had issues keeping straight and understanding what each does.

This commit provides first-class API support for concepts such as retry strategies, and how the pool handles connection counts.

Changes

  • Add: New ConnectionCountBehavior for determining leaky / non-leaky behavior
  • Add: New ConnectionRetryStrategy for allowing customization of retry behavior
  • Change: RedisConnection.defaultPort to be a computed property
  • Change: The logging keys of pool connection retry metadata
  • Rename: Several configuration properties to drop prefixes or to be combined into new structures

Result

Developers should have a much better experience exploring the available configuration options for pools and connections, being able to understand how each piece works with the underlying system.

Merge request reports