Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
const subscription = redis.psubscribe(["user:*"]); const messages = []; subscription.on("pmessage", (data) => { messages.push(data.message); }); await redis.publish("user:123", "user:123 message"); // receives await redis.publish("user:456", "user:456 message"); // receives await redis.publish("other:789", "other:789 message"); // doesn't receive console.log(messages[0]) // user:123 message console.log(messages[1]) // user:456 message console.log(messages[2]) // undefined
Subscribe to a channel by patterns/wildcards
Was this page helpful?