subscribe

This block is part of the realtime group and was last modified in core v15.0.2.

subscribe v15.0.2

Adds rooms to a socket's session, a session or every session of a user, on any node.

In pins 6 + flow
  • flow
  • rooms array
  • room value
  • group value
  • max number
  • session value

    A session id. Without session or user: the socket of the run.

  • user value

    A user guid: every session of the user, on any node.

Out pins 4 + flow
  • flow
  • success condition
  • joined seq number
  • evicted array
  • error value

Writes the rooms into each target session in Redis with the current seq as the joined seq (a resume never replays a room's past from before the join), and tells the nodes holding the sockets. On the run's own socket the join is done before the block returns. group and max keep a per-session LRU of rooms in the group and report the room they evicted (e.g. the 10 most recently opened rooms of each board, project or server a client browses).

Version history

Introduced in v15.0.2.

  • v15.0.2: block added in this release.

Back to realtime Return to the main group to view all sub-groups Back to realtime Return to the group to view all blocks within this group