Request ID is included in request messages and is used to identify requests across messages. For example, Joining Fetch references the Request ID of a SUBSCRIBE.
The client generates even numbered Request IDs, starting at 0, and the server generates odd numbered Request IDs, starting at 1. Each endpoint increments its Request ID by 2 for each new request.
Each SUBSCRIBE, PUBLISH, FETCH, SUBSCRIBE_NAMESPACE, PUBLISH_NAMESPACE, REQUEST_UPDATE, and TRACK_STATUS message consumes a Request ID. Only request messages include a Request ID; response messages do not, since they are sent on the same bidirectional stream as the request.
If an endpoint receives a Request ID where the least significant bit is
incorrect for the sender, or a duplicate Request ID, it MUST close the
session with INVALID_REQUEST_ID.