Module matrix_sdk::send_queue

source ·
Expand description

A send queue facility to serializing queuing and sending of messages.

§Room send queue

Each room gets its own RoomSendQueue, that’s available by calling Room::send_queue(). The first time this method is called, it will spawn a background task that’s used to actually send events, in the order they were passed from calls to RoomSendQueue::send().

This queue tries to simplify error management around sending events, using RoomSendQueue::send or RoomSendQueue::send_raw: by default, it will retry to send the same event a few times, before automatically disabling itself, and emitting a notification that can be listened to with the global send queue (see paragraph below) or using RoomSendQueue::subscribe().

It is possible to control whether a single room is enabled using RoomSendQueue::set_enabled().

§Global SendQueue object

The Client::send_queue() method returns an API object allowing to control all the room send queues:

Structs§

  • An event that has been locally queued for sending, but hasn’t been sent yet.
  • A per-room send queue.
  • A handle to manipulate an event that was scheduled to be sent to a room.
  • A client-wide send queue, for all the rooms known by a client.
  • A specific room ran into an error, and has disabled itself.
  • A handle to execute actions on the sending of a reaction.

Enums§