Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.1 KB

File metadata and controls

34 lines (23 loc) · 1.1 KB
code type title description
true
page
PublishAsync
Publishes a real-time message.

PublishAsync

Sends a real-time message to Kuzzle. The message will be broadcasted to all clients with subscriptions matching the index, the collection and the message content.

The index and collection are indicative and serve only to distinguish the rooms. They are not required to exist in the database.

Note: real-time messages are not persisted in the database.

Arguments

public async Task PublishAsync(string index, string collection, JObject message);
Argument Type Description
index
string
Index name
collection
string
Collection name
message
JObject
JObject representing a JSON payload

Exceptions

Throws a KuzzleException if there is an error. See how to handle error.

Usage

<<< ./snippets/publish.cs