SDK
SDK Dart v1.x
2

# publish

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

Copied to clipboard!
Future<bool> publish(
      String index, String collection, Map<String, dynamic> message)
Argument Type Description
index
String
Index name
collection
String
Collection name
message
Map<String, dynamic>
Map representing a JSON payload

# Usage

Copied to clipboard!
await kuzzle
  .realtime
  .publish("my-index", "my-collection", {
    'name': 'nina-vkote'
  });