Arguments
string | string[]
required
The channel to publish to.
Response
A subscriber instance which can subscribe to channels.
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
const subscription = redis.subscribe(["my-channel"]);
const messages = [];
subscription.on("message", (data) => {
messages.push(data.message);
});
Subscribe to a channel
const subscription = redis.subscribe(["my-channel"]);
const messages = [];
subscription.on("message", (data) => {
messages.push(data.message);
});
Was this page helpful?