RedisConnectionPoolService

Description:

A service that provides connections to Redis.

Tags:

redis, cache

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, whether a property supports the NiFi Expression Language, and whether a property is considered "sensitive", meaning that its value will be encrypted. Before entering a value in a sensitive property, ensure that the nifi.properties file has an entry for the property nifi.sensitive.props.key.

NameDefault ValueAllowable ValuesDescription
Redis ModeStandalone
  • Standalone A single standalone Redis instance.
  • Sentinel Redis Sentinel which provides high-availability. Described further at https://redis.io/topics/sentinel
  • Cluster Clustered Redis which provides sharding and replication. Described further at https://redis.io/topics/cluster-spec
The type of Redis being communicated with - standalone, sentinel, or clustered.
Connection StringThe connection string for Redis. In a standalone instance this value will be of the form hostname:port. In a sentinel instance this value will be the comma-separated list of sentinels, such as host1:port1,host2:port2,host3:port3. In a clustered instance this value will be the comma-separated list of cluster masters, such as host1:port,host2:port,host3:port.
Supports Expression Language: true (will be evaluated using variable registry only)
Database Index0The database index to be used by connections created from this connection pool. See the databases property in redis.conf, by default databases 0-15 will be available.
Supports Expression Language: true (will be evaluated using variable registry only)
Communication Timeout10 secondsThe timeout to use when attempting to communicate with Redis.
Cluster Max Redirects5The maximum number of redirects that can be performed when clustered.
Sentinel MasterThe name of the sentinel master, require when Mode is set to Sentinel
Supports Expression Language: true (will be evaluated using variable registry only)
PasswordThe password used to authenticate to the Redis server. See the requirepass property in redis.conf.
Sensitive Property: true
Supports Expression Language: true (will be evaluated using variable registry only)
Pool - Max Total8The maximum number of connections that can be allocated by the pool (checked out to clients, or idle awaiting checkout). A negative value indicates that there is no limit.
Pool - Max Idle8The maximum number of idle connections that can be held in the pool, or a negative value if there is no limit.
Pool - Min Idle0The target for the minimum number of idle connections to maintain in the pool. If the configured value of Min Idle is greater than the configured value for Max Idle, then the value of Max Idle will be used instead.
Pool - Block When Exhaustedtrue
  • true
  • false
Whether or not clients should block and wait when trying to obtain a connection from the pool when the pool has no available connections. Setting this to false means an error will occur immediately when a client requests a connection and none are available.
Pool - Max Wait Time10 secondsThe amount of time to wait for an available connection when Block When Exhausted is set to true.
Pool - Min Evictable Idle Time60 secondsThe minimum amount of time an object may sit idle in the pool before it is eligible for eviction.
Pool - Time Between Eviction Runs30 secondsThe amount of time between attempting to evict idle connections from the pool.
Pool - Num Tests Per Eviction Run-1The number of connections to tests per eviction attempt. A negative value indicates to test all connections.
Pool - Test On Createfalse
  • true
  • false
Whether or not connections should be tested upon creation.
Pool - Test On Borrowfalse
  • true
  • false
Whether or not connections should be tested upon borrowing from the pool.
Pool - Test On Returnfalse
  • true
  • false
Whether or not connections should be tested upon returning to the pool.
Pool - Test While Idletrue
  • true
  • false
Whether or not connections should be tested while idle.

State management:

This component does not store state.

Restricted:

This component is not restricted.

System Resource Considerations:

None specified.