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.
899 B
899 B
Setup Redis server on Docker
- Start docker
$ docker-composer up -d
- to enter CLI
// check image name
$ docker ps
// enter interactive shell
$ docker exec -it razer-redis_redis_1 redis-cli
- Test redis connectivity. Reference
$ sudo apt install redis-tools
// default : localhost:6379
$ redis-cli incr mycounter
(integer) 1
// test ping using address
$ redis-cli -h server1.razer.org -p 6379 -a <password> ping
PONG
// or
$ redis-cli -u redis://p%40ssw0rd@redis-16379.hosted.com:16379/0 ping
$ redis-cli --stat
$ redis-cli monitor
// publish message to queue
$ curl -u admin:admin -d "body=order_id" http://localhost:8161/api/message/shop?type=queue
// publish message to topis
$ curl -u admin:admin -d "body=order_id” http://localhost:8161/api/message/shop?type=topic
- Stop server
$ docker-compose down