box.broadcast() | Tarantool

box.broadcast()

box.broadcast(key, value)

Update the value of a particular key and notify all key watchers of the update.

Parameters:
  • key (string) – key name of the event to subscribe to
  • value – any data that can be encoded in MsgPack
Return:

none

Possible errors:

  • The value can’t be encoded as MsgPack.
  • The key refers to a box. system event

Example:

-- Broadcast value 42 for the 'foo' key.
box.broadcast('foo', 42)
Found what you were looking for?
Feedback