Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Oct 14 2020 05:34

    mrniko on master

    Update README.md (compare)

  • Oct 14 2020 05:33

    mrniko on master

    Update README.md (compare)

  • Oct 14 2020 05:33

    mrniko on master

    Update README.md (compare)

  • Oct 14 2020 05:33

    mrniko on master

    Update README.md (compare)

  • Oct 14 2020 05:32

    mrniko on master

    Update README.md (compare)

  • Oct 14 2020 05:30

    mrniko on master

    Update CHANGELOG.md (compare)

  • Oct 14 2020 05:29
    mrniko milestoned #1405
  • Oct 14 2020 05:29
    mrniko demilestoned #1405
  • Oct 14 2020 05:29
    mrniko milestoned #880
  • Oct 14 2020 05:29
    mrniko demilestoned #880
  • Oct 14 2020 05:29
    mrniko milestoned #596
  • Oct 14 2020 05:29
    mrniko demilestoned #596
  • Oct 14 2020 05:29
    mrniko demilestoned #220
  • Oct 14 2020 05:29
    mrniko milestoned #220
  • Oct 14 2020 05:29
    mrniko demilestoned #3105
  • Oct 14 2020 05:29
    mrniko milestoned #3105
  • Oct 14 2020 05:29
    mrniko milestoned #3104
  • Oct 14 2020 05:29
    mrniko demilestoned #3104
  • Oct 14 2020 05:29
    mrniko milestoned #3046
  • Oct 14 2020 05:29
    mrniko demilestoned #3046
Ragnar Rova
having RBinaryStream in a transaction does not seem to be supported
Hmm ... anyone can provide any insight how executorservice callables / runnables work? I mean, how can I access stuff in the surrounding environemtn ( it is a closure, right? )
another node / server, executing the service won't be able to really have the surrounding in which it was created, no?
Marko Mitić
@mrniko how to migrate from 3.12.x (with default FST codec) to 3.13.x with default Marshalling Codec. We have multiple instance of web app and all pointing to same AWS Elasticache (redis). When new version deployed some of them will use old Redisson lib (with prev default codec). Any suggestion appreciate to deploy new version with new codec smoothly without downtime ?

I am newbie to Redisson
Anyone who know about the issue please do reply
Since last week in our PROD environment receiving

[ERROR] 2020-09-02 07:59:46.207 [redisson-netty-4-4] [,] CommandDecoder - Unable to decode data. reply: $768
���^B{"email":"********.******@*****.COM","firstName":"**** ******","lastName":"******"}
, channel: [id: 0xb9754a6f, L:/*.*.*.*:36479 - R:redis.com/*.*.*.*:6379], command: CommandData [promise=RedissonPromise [promise=ImmediateEventExecutor$ImmediatePromise@46b21510(failure: java.util.concurrent.CancellationException)], command=(EVAL), params=[local value = redis.call('hget', KEYS[1], ARGV[2]); if value == false then return nil; end; local t,..., 5, ********.******@*****.COM, redisson__timeout__set:{********.******@*****.COM}, redisson__idle__set:{********.******@*****.COM}, redisson__map_cache__last_access__set:{********.******@*****.COM}, {********.******@*****.COM}:redisson_options, 1599029983066, PooledUnsafeDirectByteBuf(freed)], codec=org.redisson.codec.FstCodec]
java.util.concurrent.CancellationException: null
        at java.util.concurrent.CompletableFuture.cancel(CompletableFuture.java:22

can someone help me with this please
version - 3.10.0
using FSTCodec
I am serializing Java object to string and then to Redis using RMapCache
Any help apprecaited

Ragnar Rova
in the singleServer mode, we noted with 3.13.2 that it does not detect stale connections (half-closed by stateful firewall). Is setPingInterval(1000) the way to go? That ought to be the default...
1 reply
Maxim Ivanov
@mrniko HI. I want to serialize live object with the field type Map<Enum, BlockingQueue>, but client throwing exception by method persist(obj) - java.io.NotSerializableException: org.redisson.RedissonMap
redisson-3.14.3, FstCodec
Should I do a wrapper over the queue and mark the class with entity annotation? Please tell me.
Neha Patil

@mrniko Hi, we are struggling a bit around serialization, Any help would be appreciated..
we have a custom model class that we want to save in to RMapCache. This custom model has nested models. we have managed to serialize everything except one field, which we set to null to avoid serialization issue. However, that results in same does not implement Serializable or externalizable error.

Has anyone ever encountered this null serialization issue, we use default codec's .

Maxim Ivanov
So are you sure the link class implements the Serializable interface?
Rajesh Reddy Kasala
Hi, I have implemented client side caching with RLocalCachedMap but when the value is changed on redis-server it is not updated/invalidate the entry in the local cache(cache on applicaion side). Redis docuemntation says to execute the CLIENT TRACKING ON to enable it. How does it work with redisson RLocalCachedMap ? is it by default enabled or is there any configuration that i need to update ? I have the configuration with LocalCachedMapOptions.SyncStrategy.INVALIDATE . Please suggest.
Rajesh Reddy Kasala
And i am using single server application? But my use case is there will be another third party service(which we dont have any access) will modify the data in redis server. So wondering if the RLocalCacheMap will be able to invalidate the entries that have been modified in Redis-server ?
Rajesh Reddy Kasala
Or to put the question in one sentence, If a single node application(MyApplication) is using RlocalCahedMap with syncStragety invalidate, and another non java application changes the data in redis-server, will the data get invalidated in MyApplication RLocalCachedMap through Redis Server assisted Client Side caching?
Hi, We are using redis to share state between two applications and the applications are also doing some operations whenever an entry is added/removed/modified in redis cache through redisson events (Events which redisson publishes when an entry has been modified/added in RMapCache).. Now the problem is we have some operations which are bulk operations. (Not much in terms of numbers but we can assume around 500 - 1000 entries can be added at a time). I have checked that Redisson pipelining supports bulk insertion as it optimizes round trip using batching. But eventually when receiving events we will receive them one by one and the application finally has to process the events one by one. Is there a way in which we can receive the events also in batches ?? e.g. (100 rows inserted and list of 100 entries will be provided in events)
Michail Ivanilov
Hi @mrniko could you please confirm if SnappyCodecV2 is thread safe? I couldn't find info about its thread safety in the documentation or in this chat.
I've checked snappy-java itself and it should be thread safe (xerial/snappy-java#16) but I am wondering if the Redisson client wrapper SnappyCodecV2 is thread safe too?
2 replies
Jaeyeon Kim

Hi, using 4 shard nodes of AWS r5.large specification.
This error occurs when there is little traffic on the server. (1000 TPS)

java.util.concurrent.CompletionException: org.redisson.client.RedisTimeoutException: Subscribe timeout: (6000ms). Increase 'subscriptionsPerConnection' and/or 'subscriptionConnectionPoolSize' parameters.
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1803)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: org.redisson.client.RedisTimeoutException: Subscribe timeout: (6000ms). Increase 'subscriptionsPerConnection' and/or 'subscriptionConnectionPoolSize' parameters.
    at org.redisson.command.CommandAsyncService.syncSubscription(CommandAsyncService.java:119)
    at org.redisson.RedissonTopic.addListener(RedissonTopic.java:101)
    at org.redisson.RedissonMapCache.addListener(RedissonMapCache.java:2076)
    at com.superb.thaad.domain.teammatch.lobby.LobbySession.lambda$new$4(LobbySession.java:96)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1800)
    ... 7 more
final var config = new Config();
        .addNodeAddress(String.format("redis://%s:%d", redisProperties.getHost(), redisProperties.getPort()));

Is there anything missing in the config setting?

Hi, I am planning to use Redisson for AWS elasticache with near cache(Caffein). I don't see a way to enable Caffein metrics using redisson. Redis cache metrics can be found on cloudWatch. But I am wonder how to get metrics for the L0 cache.
Ebrahim Khosravani
How can I create a manual class to connect with Redis as redisson didn't handle the Quarkus !?

I was looking at serializers/codec and noticed that it used to be FST but was changed to for MarshallingCodec.. Was curious on why the change?
As based on https://github.com/eishay/jvm-serializers/wiki#full-object-graph-serializers it looks like the FST is quicker and smaller in size..

A simple test showed that JVM serializer object of 366 went to:

  • FST = 144
  • MarshallingCodec = 227


Jonathan S. Fisher

Sorry to ask a really dumb question, but I'm stuck. How do I set forceSerializable on FstCodec? For the life of me I cannot figure it out, even after perusing the redisson source:

"codec": {
        "config": {
            "forceSerializable": true

Does not work (predictably, as there is no config property of FstCodec)

Valters Vingolds
It seems to me FstCodec is designed in a way to be basically unconfigurable from the config file. Only programmatic config is possible: weird choice.
@mrniko May be a dumb question, in the cluster service configuration, while executing the lua script using eval() method, does READ_WRITE Mode guarantee that the script will be executed on the MASTER node and not the replica node?
Jose Escobar Belmonte
Hi Redisson team! I'm using rbuckets as an object cache in kotlin with redis and I have some doubts
first, I should use instead of rmap? I have read that if I want TTL used by redis I have to use rbucket instead of rmap
and second, RBucketsReactive interface does not support TTL for setting multiple objects at the same time. Is there a plan to enable it?
It is mentioned that the RedLock algorithm is deprecated so which algorithm is currently being used ?
I am executing lua String lua="local val=redis.call('hget',KEYS[1],KEYS[2]); local res=redis.call('hget',KEYS[3],val); return res";
     rClient.getScript().eval(RScript.Mode.READ_ONLY,lua, RScript.ReturnType.MAPVALUE, Arrays.asList(appConfig.getChargingSrcIdToTransactionIdMap(),
                    StringUtils.join(ChargingConstants.CHARGING_TRANSACTION_PREFIX, fetchId), appConfig.getChargingMap()),appConfig.getLocaleLang());
   like this but it is giving GZIP:not in GZip Format
Please helpppp
I am getting this exception please help....
Or Goshen
I'm trying to call a remote service (which I implemented and I get an expection:
Caused by: org.redisson.remote.RemoteServiceAckTimeoutException: No ACK response after 1000ms for request: RemoteServiceRequest
here is what I did:
I created a simple java interface:
public interface ITest {
public static final String NAME = "TestService";
public boolean ping();
Or Goshen
implemented it in a class like so:
public class TestService { private RedissonClient client; public TestService() { client = Redisson.create(); RRemoteService remoteService = client.getRemoteService(); remoteService.register(TestService.class, this); } public boolean ping() { return true; } }
now I try to call this service with:
RedissonClient client = Redisson.create(); ITest service = client.getRemoteService(ITest.NAME).get(ITest.class); service.ping();
this fails with the mentioned exception
what am I missing ?
Or Goshen
found my mistake .. I shouldn't call "client.getRemoteService(ITest.NAME).get(ITest.class); "
it should be called nameless: "client.getRemoteService().get(ITest.class); "
Rishabh Kumar
Hi I was just wondering if RMapCacheReactive put method is async or not, like what happens behind the scenes?

Hi Team
I am seeing this error

aused by: org.redisson.client.RedisException: ERR WAIT cannot be used with slave instances. Please also note that since Redis 4.0 if a slave is configured to be writable (which is not the default) writes to slaves are just local and are not propagated.. channel: [id: 0x90c58500, L:/ - R:] command: (WAIT), promise: RedissonPromise [promise=ImmediateEventExecutor$ImmediatePromise@35eeb35e(incomplete)], params: [1, 1000]
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:370)
at org.redisson.client.handler.CommandDecoder.decodeCommandBatch(CommandDecoder.java:271)
at org.redisson.client.handler.CommandDecoder.decodeCommand(CommandDecoder.java:210)
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:137)
at org.redisson.client.handler.CommandDecoder.decode(CommandDecoder.java:113)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502)
at io.netty.handler.codec.ReplayingDecoder.callDecode(ReplayingDecoder.java:366)

Hi Redisson team, we see redisson 'RedisTimeoutException: Command still hasn't been written into connection!' exceptions after redis master fail over to replica in cluster mode. The exceptions don't go away until we do an application restart ie until we create a new redisson client. We have tried with pingConnectionInterval of 5s, 30s etc. Also tried increasing netty threads, but redisson does not recover until we do a restart after fail over. How can we resolve this?
@spathros Even we are seeing the same issue and trying to resolve this. Can you please share the configuration you are using here ?
@waykar-prashant I created this redisson issue, details of configuration are here redisson/redisson#4278
Yash Jain
@mrniko We are using Elasticache Redis in cluster mode with 3 shards. For the configuration, we are providing the node addresses of the master nodes. We are seeing a lot of tcp connections on the client machine in SYN_SENT state after cluster went in to failover state. The redisson version is 3.11.3. Should we be specifying all the nodes in the configuration i.e. both the Master and slave nodes. Please let us know what is the best practice around configuration for Elasticache Cluster.
What is the best open source tool/software for performance verfiying to identify performance bugs in Java?

Text Over Image with Java Web Application


I want to display an image in the web application where user can add text on the image.

Finally i need to save in DB, later user has to view the editable text and edit if required

How to achieve this in java web application - UI? back-end? DB (json or image or co-ordinates) ?

Does any opensource can be used in all the levels? Can someone suggest some comments/feedback


URL url = new URL(...); --> FAILS here when i try to download a https image - "javax.imageio.IIOException ... "Can't get input stream from URL!""

URL works from browser
URL works in standalone program
URL fails when used in java web application


  1. Is any special treatment required to access https image from web app?
  2. How does it works in standalone program but not via web app though the certs are not installed in local machine?

What is the correct/right approach and what is the underlying differences?