3.1.5.1.6.3 Processing Stream Messages

Stream messages that are duplicates or are out of order are rejected. If the message does not satisfy one of the following criteria, then it is either a duplicate or out of order and MUST be ignored. No further processing is performed.

  • The <stream> element contains the <start> element, its <current> element is set to 1, and its <streamId> element is not equal to Stream.IncomingId.

    OR

  • The <streamId> element is equal to Stream.IncomingId, and its <current> element is equal to Stream.IncomingSequenceNumber + 1.

    OR

  • The <streamId> element is equal to Stream.IncomingId, its <current> element is greater than Stream.IncomingSequenceNumber, and its <previous> element is less than or equal to Stream.IncomingSequenceNumber.

If the message was not rejected, the protocol MUST perform the following steps:

  • If the <stream> element contains the <start> element, and its <current> element is set to 1, the protocol MUST set Stream.IncomingId to the content of the message's <streamId> element.

  • The protocol MUST set Stream.IncomingSequenceNumber to the <current> value of the message.

  • The protocol MUST set Stream.SendReceiptsTo to the URI in the <sendReceiptsTo> element of the <start> element of the first stream message.

  • The protocol MUST add the received stream message to Stream.UnacknowledgedStreamMessages.

  • If Stream.UnackedStreamMessageArrivalTime equals zero, the protocol MUST set Stream.UnackedStreamMessageArrivalTime to the current system time.

  • If the Stream Receipt Coalescing Timer (section 3.1.2.3) is running, the protocol MUST stop the Stream Receipt Coalescing Timer.

  • If the current system time – Stream.UnackedStreamMessageArrivalTime is equal to or greater than 10 seconds, the protocol MUST perform the following actions:

  • The protocol MUST start the Stream Receipt Coalescing Timer.