RedisSubscribe

Subscribes to a Redis channel for messages.

Method Signature

RedisSubscribe(cacheName=[any], channel=[any], callback=[any])

Arguments

Argument
Type
Required
Description
Default

cacheName

any

true

The name of the redis cache to use.

channel

any

true

The channel name to subscribe to.

callback

any

true

The callback function to invoke when messages are received.

Examples

Subscribe to a Redis channel:

// Subscribe to a channel with a callback handler
RedisSubscribe(
    cache = "myRedisCache",
    channel = "notifications",
    callback = function( message ) {
        println( "Received message: " & message );
    }
);

Handle multiple message types:

Subscribe to multiple channels:

Last updated

Was this helpful?