The receipt that arrived after the goodbye

Picture the paperwork of a breakup. The cancellation is acknowledged, the receipt is filed, and then one more message slides in behind it — written before anyone said stop, still working its way through the system. RFC 3343, the APEX Presence Service, put that awkwardness into the standard on purpose.

Its rule is short and stubborn. Once the service processes a terminate and sends its code 250 reply, it will emit no further presence or watcher updates — but updates sent earlier may still be in transit and may still arrive. Termination closed the source. It did not rewrite the network's past.

That is the sentence worth quoting, because it splits one word into two very different facts: a service-side cutoff is not a drained queue. A consumer holding a late update may not call the cancellation a lie, and may not assume the update describes the subscription it is currently running. Both records can be perfectly authentic while describing different moments in the delivery chain.

The short version

  • RFC 3343 promised the presence service would send no further updates after processing terminate and its reply, while warning that earlier presence or watcher updates might still arrive because they were already in transit.
  • A code 250 cancellation reply therefore proved a service-side cutoff, not queue drainage; transaction correlation, message age, current subscription generation and consumer disposition remained separate evidence.

Three long-lived operations behind one well-known endpoint

The APEX presence service lived at the well-known endpoint apex=presence inside an administrative domain. Applications could publish presence entries, subscribe to a publisher's presence, or watch the list of endpoints subscribing to that publisher.

A subscription immediately returned the current presence entry. With a non-zero duration it then produced new publish operations whenever the entry changed, and eventually ended with a terminate. A zero-duration subscription was simply a one-time poll. A watch first received code 250, then one notify for each current subscriber, and later notifications as subscriptions began or ended.

These were long-lived operations, not tidy request-response pairs, so the service had to persist both presence entries and in-progress operations. Service-originated publish and notify messages carried the transaction identifier of the subscription or watch that caused them. That identifier made lineage visible. It did not make every later arrival current.

What terminate actually promised — and what code 250 did not

Either side could end a subscribe or watch operation. A consumer sent terminate with the transaction identifier. If it referred to no in-progress operation for that originator, the service returned error 550. Otherwise it removed the operation and replied with code 250.

Then the specification states the awkward part without blinking: following termination, the originator may receive further presence or watcher updates. The service sends nothing new after it processes the terminate and sends the reply, but earlier updates may be in transit.

So the reply carries a scoped fact. The active operation has ended at the service, and the service's future send behaviour has changed. It says nothing about relay buffers, open connections, schedulers or consumer input queues. It does not retract a publish or notify already handed to the mesh.

Modern engineers would call the stronger property a drain barrier — evidence that everything before a boundary has arrived, been discarded under a defined rule, or been accounted for. RFC 3343's terminate receipt was never such a barrier. The document preserved the gap instead of papering over it, which is a rarer virtue than it sounds.

Correlation survives validity

The late update still carried the old transaction identifier, so the receiving application could say exactly which ended operation had caused it. Correlation is valuable. It is not a command to apply the content.

The consumer needs a second piece of state: an operation generation or tombstone recording the termination boundary and the late-message policy. It might discard the update, retain it for audit, compare its presence timestamp against a newer snapshot, or quarantine it until reconciliation. What it must never do is read a matching identifier as proof that the subscription is still live.

The same trap opens when a new subscription replaces an earlier one for the same originator and subject. RFC 3343 silently terminated the prior operation before continuing. A reused logical relationship did not erase the older generation's in-transit messages — and without a generation-aware ledger, an update from the dead operation looks exactly like the first update of the new one.

Presence was never attachment

Every administrative domain kept a presence entry for each endpoint regardless of whether that endpoint was attached to the relay mesh. Each entry had a publisher, lastUpdate, publisher information and one or more tuples. A tuple identified a destination URI, an availableUntil time, optional information and capabilities.

An entry's existence therefore proved no live attachment. An availableUntil claim described the latest time an entity was capable of receiving messages within the data model; it was never an observed delivery result. A late update could be a faithful copy of a stored entry and still be operationally stale for the decision in front of the consumer.

Publishing had its own concurrency boundary. The supplied presence lastUpdate had to match the stored value semantically or the service returned code 555. On success the service updated the entry, set a new service time and replied 250. That protected a mutation at the service. It proved nothing about when any subscriber received the change.

Privacy, history, and the RFC that never shipped

RFC 3343 was published in April 2003 as Experimental. It is now Historic. The RFC Editor record lists its current state, and its errata search supplies the current correction record. The IETF history dated 29 July 2012 records that, to the best of the IETF's knowledge, no implementations of RFCs 3340 through 3343 had been deployed, and that APEX functionality was provided by widely deployed XMPP under RFCs 6120 and 6121.

That qualified record does not claim the termination race caused non-adoption. It offers no implementation, no queue measurement, no incident. The RFC's security section separately noted that timestamps could reveal location through their offsets, permitting conversion followed by -00:00 when the location information was sensitive. Even a valid presence record carried disclosure consequences well outside its delivery mechanics.

The inheritance that survives is narrower and more useful than the protocol itself. Keep separate receipts for update creation, handoff to transport, termination processing, source-side cutoff, relay drainage, consumer arrival and consumer action. If only the first four exist, do not invent the fifth. A cancellation can be entirely real while its past is still walking up the drive.

Sources