redis-quartz
redis-quartz copied to clipboard
Is redis-quartz using Pub/sub mechanism to implement global locking?
As per the blog: https://redislabs.com/blog/run-quartz-the-java-job-scheduler-on-top-of-redis/, redis-quartz should be using pub/sub mechanism to implement global locking. Instead I see the library using JedisLock to implement this (which is in-turn using setNX and timeout for locking).
An additional element used in Redis JobStore is global locking with Redis' publish and subscribe mechanism (Pub/Sub), in which JobStore listens to an ‘unlock’ message.
I also see a class UnlockListener is defined in the RedisJobStore but is not being used anywhere.
Hi @abhishek-goyal , when the above blog post was published, redis-quartz had used pub/sub to implement global locking. It is using jedis-lock now, which is implementing redis distributed lock.
Hi @kehati ,
Thanks that clarifies my doubt. Just wondering why did we move away from pub-sub mechanism of locking? Does distributed lock mechanism we are using (jedis-lock) provides a performance gain or is more reliable?
Regards, Abhishek