To optimize wire efficiency, Subgroups and Datagrams refer to a track by a numeric identifier, rather than the Full Track Name. Track Alias is chosen by the publisher and included in SUBSCRIBE_OK (Section 10.8) or PUBLISH (Section 10.11).
The same Track Alias MUST NOT be used by a publisher to refer to two different
Tracks simultaneously in the same session. If a subscriber receives a
PUBLISH or SUBSCRIBE_OK that uses the same Track Alias as a different Track
with an Established subscription, it MUST close the session with error
DUPLICATE_TRACK_ALIAS.
Objects can be sent before the Subscriber knows the Track Alias, requiring buffering Objects with an unknown Track Alias. If a Track Alias is used for two concurrent subscriptions to the same Track, an Object that arrives with the Track Alias could be for either Subscription. Reusing the same Track Alias for concurrent subscriptions to the same Track can lead to missed delivery if objects for the new subscription arrive before the control message establishing the shared Alias. The Subscriber can assume the Track Alias is reused until told otherwise, in order to avoid missing Objects.
To avoid a protocol violation and to ensure the Subscriber knows which Track Objects are from, Publishers SHOULD NOT reuse a Track Alias for different Tracks within a session, unless it is certain the prior Subscription has been completely closed and no Objects are scheduled to be sent or in flight.
Objects can arrive after a subscription has been cancelled. Subscribers SHOULD retain sufficient state to quickly discard these unwanted Objects, rather than treating them as belonging to an unknown Track Alias.