MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / RM_PublishMessage

Function RM_PublishMessage

src/module.cpp:2097–2103  ·  view source on GitHub ↗

Publish a message to subscribers (see PUBLISH command). */

Source from the content-addressed store, hash-verified

2095
2096/* Publish a message to subscribers (see PUBLISH command). */
2097int RM_PublishMessage(RedisModuleCtx *ctx, RedisModuleString *channel, RedisModuleString *message) {
2098 UNUSED(ctx);
2099 int receivers = pubsubPublishMessage(channel, message);
2100 if (g_pserver->cluster_enabled)
2101 clusterPropagatePublish(channel, message);
2102 return receivers;
2103}
2104
2105/* Return the currently selected DB. */
2106int RM_GetSelectedDb(RedisModuleCtx *ctx) {

Callers

nothing calls this directly

Calls 2

pubsubPublishMessageFunction · 0.85
clusterPropagatePublishFunction · 0.85

Tested by

no test coverage detected