You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
499b54ec73 | 3 years ago | |
---|---|---|
.. | ||
redisson-quarkus-16 | 3 years ago | |
redisson-quarkus-20 | 3 years ago | |
README.md | 3 years ago | |
pom.xml | 3 years ago |
README.md
Quarkus extension for Redis
Integrates Redisson with Quarkus framework.
Supports Quarkus 1.6.x - 2.6.x
Native image with RemoteService. Click to expand!
To use RemoteService in native image add dynamic-proxy.json and reflection-config.json files in `quarkus.native.additional-build-args` setting.
-H:DynamicProxyConfigurationResources=dynamic-proxy.json,-H:ReflectionConfigurationFiles=reflection-config.json
dynamic-proxy.json:
[
["<Remote Service interface name>"]
]
reflection-config.json:
[
{
"name":"<Remote Service interface name>",
"allDeclaredMethods":true
}
]
Usage
1. Add redisson-quarkus
dependency into your project:
Maven
<dependency>
<groupId>org.redisson</groupId>
<!-- for Quarkus v1.6.x - v1.13.x -->
<artifactId>redisson-quarkus-16</artifactId>
<!-- for Quarkus v2.0.x - v2.6.x -->
<artifactId>redisson-quarkus-20</artifactId>
<version>3.16.8</version>
</dependency>
Gradle
// for Quarkus v1.6.x - v1.13.x
compile 'org.redisson:redisson-quarkus-16:3.16.8'
// for Quarkus v2.0.x - v2.6.x
compile 'org.redisson:redisson-quarkus-20:3.16.8'
2. Add settings into application.properties
file
Config structure is a flat Redisson YAML configuration - single mode, replicated mode, cluster mode, sentinel mode, proxy mode
NOTE: Setting names in camel case should be joined with hyphens (-).
Below is the configuration for Redisson in single mode.
quarkus.redisson.single-server-config.address=redis://localhost:6379
quarkus.redisson.single-server-config.password=null
quarkus.redisson.threads=16
quarkus.redisson.netty-threads=32
Use quarkus.redisson.file
setting to specify path to config file.
3. Use Redisson
@Inject
RedissonClient redisson;
Try Redisson PRO with ultra-fast performance and support by SLA.