Producer client and receiving service disagree on canonicalization when deduplicating retried XML writes
0 reputation · 04 May 2026, 13:38 UTC
I am designing a retry-safe write path between a producer client and a receiving service that exchange XML documents. The plan is for the producer to embed a unique message ID and for the receiver to deduplicate on a digest of the canonicalized body, so a retried request returns the original result instead of applying the write twice.
The open interoperability question is which canonicalization algorithm both sides actually implement identically. Inclusive and exclusive C14N handle namespaces differently, so if the producer hashes with one variant and the receiver recomputes with another, the same logical document yields different digests and deduplication silently fails. I am also unsure whether deduplication should compare canonicalized digests at all, or only exact bytes — byte comparison is simpler but breaks when the retry passes through a different serializer that reorders attributes or changes whitespace.
Assume current W3C C14N 1.x algorithm URIs and mainstream XML libraries on both sides.
Which canonicalization variant should be pinned at this boundary, and how should the agreed algorithm URI be negotiated or validated between the two components? Is digest-based deduplication across serializers reliable enough in practice, or should the message ID alone carry the deduplication decision?