1# Sequence Number # 2 3Apache Thrift built sequence numbers into every protocol exchange to allow 4for clients that may submit multiple outstanding requests on a single transport 5connection. This is typically done by asynchronous clients. 6 7The following rules apply to sequence numbers: 8 91. A sequence number is a signed 32-bit integer. Negative values are allowed. 101. Sequence numbers `MUST` be unique across all outstanding requests on a 11 given transport connection. There is no requirement for unique numbers 12 between different transport connections even if they are from the same client. 131. A server `MUST` reply to a client with the same sequence number that was 14 used in the request. This includes any exception-based reply. 151. A client `MAY` use sequence numbers if it needs them for proper operation. 161. A client `SHOULD` set the sequence number to zero if it does not rely 17 on them. 181. Wrapped protocols (such as THeaderProtocol) `SHOULD` use the same sequence 19 number on the wrapping as is used on the payload protocol. 20 21Servers will not inspect or make any logic choices based on the sequence number 22sent by the client. The server's only job is to process the request and reply 23with the same sequence number. 24