Skip to content

deepakmuthekar/spring-boot-redis-listener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-boot-redis-listner

Redis Windows installation:

  1. Go To : https://github.com/MicrosoftArchive/redis/releases
  2. Download latest release msi and run it to install Redis

Start Redis on Windows:

I installed Redis at location D:\Redis

Open command prompt and goto Redis installation directory in our case

cd D:\Redis

Then execute command :

D:\Redis>redis-server.exe

Now redis is running on default port 6379

Redis CLI

Open command prompt and goto Redis installation directory in our case

cd D:\Redis

Then execute command :

D:\Redis>redis-cli.exe

On our application strtup we are createing a key SEASON with value WINTER.

to test the expiry key event listner

in CLI set the expiry for the key SEASON for e.g. 10 sec with command

EXPIRE SEASON 10

after 10 seconds SEASON key wil expire and you will get line : INSIDE EVENT EXPIRY HANDLER --------------------------- printed on your console which is written inside lsitnet event handler.

Note : Tpo enable key expiry notifications we need to execute the command

redis-cli config set notify-keyspace-events KEA

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages