Skip to content

Control Messages

  • Drafts 07–16: one bidirectional control stream carries every control message. Draft-16 also sends each SUBSCRIBE_NAMESPACE on its own bidirectional stream.
  • Drafts 17–23: each peer opens a control stream that starts with SETUP. Every request (SUBSCRIBE, PUBLISH, FETCH, TRACK_STATUS, PUBLISH_NAMESPACE, SUBSCRIBE_NAMESPACE, and from draft-18 SUBSCRIBE_TRACKS) opens its own bidirectional request stream, which carries the request, its response and any updates. Closing that stream ends the request, so there are no separate unsubscribe or cancel messages.

The tables below list the draft-23 messages, with the drafts each one exists in and the message that does the same job in earlier drafts. See the control message type reference for the type codes of every supported draft.

MessageType IDSent byDraftsEarlier drafts
SETUP0x2F00Both17–23CLIENT_SETUP + SERVER_SETUP: 0x20 / 0x21 in 11–16, 0x40 / 0x41 in 07–10
GOAWAY0x10Both07–23

Drafts 07–16 also have a request-ID credit message: MAX_SUBSCRIBE_ID (0x15) in 07–10, MAX_REQUEST_ID (0x15) in 11–16.

MessageType IDSent byDraftsEarlier drafts
REQUEST_OK0x07Receiver of a request15–23A separate OK message per request type
REQUEST_ERROR0x05Receiver of a request15–23A separate ERROR message per request type, e.g. SUBSCRIBE_ERROR (0x05)
REQUEST_UPDATE0x02Sender of a request, or the subscriber of a PUBLISH16–23SUBSCRIBE_UPDATE (0x02) in 07–15
MessageType IDSent byDraftsEarlier drafts
SUBSCRIBE0x03Subscriber07–23
SUBSCRIBE_OK0x04Publisher07–23
PUBLISH0x1DPublisher12–23
PUBLISH_DONE0x0BPublisher14–23SUBSCRIBE_DONE (0x0B) in 07–13
PUBLISH_STATE_NOTIFY0x22Publisher20–23

PUBLISH is accepted with PUBLISH_OK (0x1E) in drafts 12–18 and with REQUEST_OK in drafts 19–23. UNSUBSCRIBE (0x0A) exists in drafts 07–16.

MessageType IDSent byDraftsEarlier drafts
FETCH0x16Subscriber07–23

In drafts 07–22 a successful FETCH is answered with FETCH_OK (0x18); in draft-23 it is answered with REQUEST_OK. FETCH_CANCEL (0x17) exists in drafts 07–16, and FETCH_ERROR (0x19) in drafts 07–14.

MessageType IDSent byDraftsEarlier drafts
PUBLISH_NAMESPACE0x06Publisher14–23ANNOUNCE (0x06) in 07–13
SUBSCRIBE_NAMESPACE0x50Subscriber18–23SUBSCRIBE_NAMESPACE (0x11) in 13–17, SUBSCRIBE_ANNOUNCES (0x11) in 07–12
NAMESPACE0x08Publisher16–23
NAMESPACE_DONE0x0EPublisher16–23
SUBSCRIBE_TRACKS0x51Subscriber18–23
PUBLISH_SKIPPED0x0FPublisher19–23PUBLISH_BLOCKED (0x0F) in 17–18

How discovery works in each draft is on the SUBSCRIBE_NAMESPACE explainer.

MessageType IDSent byDraftsEarlier drafts
TRACK_STATUS0x0DSubscriber13–23TRACK_STATUS_REQUEST (0x0D) in 07–12

The name changes sides at draft-13. Through draft-12 the request is TRACK_STATUS_REQUEST (0x0D) and TRACK_STATUS (0x0E) is the response; from draft-13 TRACK_STATUS (0x0D) is the request, answered by TRACK_STATUS_OK (0x0E) in drafts 13–14 and by REQUEST_OK from draft-15. Code matching on the name alone across that boundary compares a response against a request.

See draft-07’s own table for the oldest supported draft.