OxalisCommunity / oxalis

Oxalis - PEPPOL Access Point open source implementation - Core component
Other
124 stars 90 forks source link

Transmission identifier should not be equal to Message-ID #436

Open artjomsk opened 4 years ago

artjomsk commented 4 years ago

Hello!

As far as I understand Message-ID should be unique for payload, but TransmissionID should identify a specific transmission / transmission attempt.

However, in Oxalis messageID is generated each time even for same payload. OK, we can create own MessageIdGenerator implementation. But in that case TransmissionID will be same for same payload, because in As2MessageSender:

transmissionIdentifier = TransmissionIdentifier.fromHeader(messageId);

and all the method above does is removing "<" and ">".

Is it a bug? And what is correct way to have own MessageID (probably not unique) and unique TransmissionID?

P.S. Related to #294

klakegg commented 4 years ago

Where in RFC 4130 is this specificed?

artjomsk commented 4 years ago

I've found the idea here - https://github.com/difi/oxalis/issues/133#issuecomment-38788913

and for me it sounds logical. Why we need both MessageId and TransmissionId if they are almost same and always unique?

OK, from RFC 4130 section "5.5 HTTP Error Recovery":

If the HTTP client fails to read the HTTP server response data, the POST operation with identical content, including same Message-ID, SHOULD be repeated, if the condition is transient. The Message-ID on a POST operation can be reused if and only if all of the content (including the original Date) is identical. /--/ Servers SHOULD be prepared to receive a POST with a repeated Message-ID. The MIME reply body previously sent SHOULD be resent, including the MDN and other MIME parts.

klakegg commented 4 years ago

The section from RFC 4130 is related to Message-ID during retry. How about TransmissionID?

artjomsk commented 4 years ago

TransmissionID is not specified in RFC 4130, it looks like implementation details of Oxalis. And you should know its meaning. Please, give short description why TransmissionID is needed if it's hardcoded to be almost same to MessageID and how it correlates the fact MessageID can be repeated (retry case)

phax commented 4 years ago

See chapter 3.2 "Reception Awareness features and Duplicate Detection" of the OASIS AS4 profile

SuperJuell commented 3 years ago

This issue is closed due to age and lack of activity.

open-gdsn commented 3 years ago

Closing due to lack of activity from the former code maintainers does not feel right. If in a retransmission, the messageID changes that is wrong (did not test this) but in the http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/profiles/AS4-profile/v1.0/AS4-profile-v1.0.pdf

This is stated:

If doing so, theeb:MessageInfo/eb:MessageId element of the resent mes-sage and of the original User message MUST be same.

SuperJuell commented 3 years ago

Hi, I'm sorry for closing this issue. We will make sure this is analysed further.