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

Function publishCommand

src/pubsub.cpp:425–432  ·  view source on GitHub ↗

PUBLISH */

Source from the content-addressed store, hash-verified

423
424/* PUBLISH <channel> <message> */
425void publishCommand(client *c) {
426 int receivers = pubsubPublishMessage(c->argv[1],c->argv[2]);
427 if (g_pserver->cluster_enabled)
428 clusterPropagatePublish(c->argv[1],c->argv[2]);
429 else
430 forceCommandPropagation(c,PROPAGATE_REPL);
431 addReplyLongLong(c,receivers);
432}
433
434/* PUBSUB command for Pub/Sub introspection. */
435void pubsubCommand(client *c) {

Callers

nothing calls this directly

Calls 4

pubsubPublishMessageFunction · 0.85
clusterPropagatePublishFunction · 0.85
forceCommandPropagationFunction · 0.85
addReplyLongLongFunction · 0.85

Tested by

no test coverage detected