You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/develop/reference/modules/modules-api-ref.md
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5088,6 +5088,31 @@ write actions, please refer to [`RedisModule_AddPostNotificationJob`](#RedisModu
5088
5088
5089
5089
See [https://redis.io/docs/latest/develop/use/keyspace-notifications/](https://redis.io/docs/latest/develop/use/keyspace-notifications/) for more information.
int RedisModule_UnsubscribeFromKeyspaceEvents(RedisModuleCtx *ctx,
5096
+
int types,
5097
+
RedisModuleNotificationFunc callback);
5098
+
5099
+
**Available since:** unreleased
5100
+
5101
+
5102
+
[`RedisModule_UnsubscribeFromKeyspaceEvents`](#RedisModule_UnsubscribeFromKeyspaceEvents) - Unregister a module's callback from keyspace notifications for specific event types.
5103
+
5104
+
This function removes a previously registered subscription identified by both the event mask and the callback function.
5105
+
It is useful to reduce performance overhead when the module no longer requires notifications for certain events.
5106
+
5107
+
Parameters:
5108
+
- ctx: The `RedisModuleCtx` associated with the calling module.
5109
+
- types: The event mask representing the keyspace notification types to unsubscribe from.
5110
+
- callback: The callback function pointer that was originally registered for these events.
5111
+
5112
+
Returns:
5113
+
-`REDISMODULE_OK` on successful removal of the subscription.
5114
+
-`REDISMODULE_ERR` if no matching subscription was found or if invalid parameters were provided.
0 commit comments