Page History
Redis Key-Value Store Component
Prerequisites
An instance of Redis server needs to run on a node and needs to be accessible from the Blueriq Runtime.
Depending on the linux distribution, a Redis package may be available from the repository in any case consult their official documentation here.
Info |
---|
Redis does not officially support Windows. However, the Microsoft Open Tech group develops and maintains this Windows port targeting Win64. More information here. |
Enable/Disable
In order to enable the component, the profile "keyvalue-redis-store" profile must be added in the bootstrap.properties
Code Block |
---|
spring.profiles.active=native,keyvalue-redis-store |
Properties
The Redis The Redis Key-Value Store Component defines the following properties used for 10. Concurrency Control on Multiple Nodes [editor]:
Property | Description | Required | Default Value |
---|---|---|---|
blueriq.keyvalue-redis-store.subscription-pool.type | The thread pool type to use for the keyspace notifications subscription thread pool. | FALSE | CACHED |
blueriq.keyvalue-redis-store.subscription-pool.thread-name-prefix | The thread name prefix used for threads in the keyspace notifications subscription thread pool. | FALSE | keyspace-subscription- |
blueriq.keyvalue-redis-store.subscription-pool.thread-count | Indicates how many threads should be created when using FIXED thread pools. | FALSE | 0 |
blueriq.keyvalue-redis-store.task-pool.type | The thread pool type to use for the keyspace notifications task thread pool. | FALSE | FIXED |
blueriq.keyvalue-redis-store.task-pool.thread-name-prefix | The thread name prefix used for threads in the keyspace notifications subscription thread pool. | FALSE | keyspace-task- |
blueriq.keyvalue-redis-store.task-pool.thread-count | Indicates how many threads should be created when using FIXED thread pools. | FALSE | 4 |
The Redis Key-Value Store Component uses does not define any new properties, however it does use the following default Spring Boot properties in order to connect to Redis:
Property | Description | Required | Default Value |
---|---|---|---|
spring.redis.host | The DNS name or IP address of the Redis server | TRUE | |
spring.redis.port | The port on which to connect to Redis | FALSE | 6379 |
spring.redis.password | The password used to connect to Redis. Can be left empty if no password is required. | FALSE |
The following example configuration connects the Runtime to a Redis instance running on localhost on the default port and using a password:
Code Block |
---|
spring.redis.host=localhost spring.redis.password=example |
Custom implementation plug-in
Blueriq provides an IKeyValueStore interface which can be used to interact with a generic key-value store. In order to use this interface, add blueriq-component-api to your project's dependencies:
Code Block |
---|
<dependency> <groupId>com.blueriq</groupId> <artifactId>blueriq-component-api</artifactId> <version>${blueriq.version}</version> </dependency> |
Panel | |||||||||
---|---|---|---|---|---|---|---|---|---|
|