Redis Pub/Sub: PSUBSCRIBE
PSUBSCRIBE pattern [pattern ...]
Redis PSUBSCRIBE command is used to subscribe to channels matching the given patterns.
Syntax:
PSUBSCRIBE CHANNEL_NAME_OR_PATTERN [PATTERN...]
Following listing shows some supported patterens in redis
- h?llo subscribes to hello, hallo and hxllo
- h*llo subscribes to hllo and heeeello
- h[ae]llo subscribes to hello and hallo, but not hillo
Available since
2.0.0.
Example: Redis PSUBSCRIBE
redis 127.0.0.1:6379> PSUBSCRIBE mychannel Reading messages... (press Ctrl-C to quit) 1) "psubscribe" 2) "mychannel" 3) (integer) 1
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join