MCPcopy Create free account
hub / github.com/F-Stack/f-stack / publishCommand

Function publishCommand

app/redis-6.2.6/src/pubsub.c:405–412  ·  view source on GitHub ↗

PUBLISH */

Source from the content-addressed store, hash-verified

403
404/* PUBLISH <channel> <message> */
405void publishCommand(client *c) {
406 int receivers = pubsubPublishMessage(c->argv[1],c->argv[2]);
407 if (server.cluster_enabled)
408 clusterPropagatePublish(c->argv[1],c->argv[2]);
409 else
410 forceCommandPropagation(c,PROPAGATE_REPL);
411 addReplyLongLong(c,receivers);
412}
413
414/* PUBSUB command for Pub/Sub introspection. */
415void 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