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 #
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 #
await kuzzle
.realtime
.publish("my-index", "my-collection", {
'name': 'nina-vkote'
});
Edit this page on Github(opens new window)