Closed tigran-a closed 1 year ago
Yes, it can indeed happen that a Receipt is sent when the message was rejected earlier. As the sending MSH should have received an Error response on the earlier sent message the risk of this actually happening is probably low. But the issue still needs to fixed! Thanks for signalling this.
Hi,
It seems that the duplicate detection considers previous messages both in DELIVERED and FAILURE state, and in both cases marks the user message as DUPLICATE https://github.com/holodeck-b2b/Holodeck-B2B/blob/73b5caf22ad04a965ef1874c12533523a726e63b/modules/holodeckb2b-core/src/main/java/org/holodeckb2b/core/receptionawareness/DetectDuplicateUserMessages.java#L108
Later, in CreateReceipt, there is no difference between DELIVERED and DUPLICATE state for receipt creation https://github.com/holodeck-b2b/Holodeck-B2B/blob/0af34579b1bbd7967e9493d5a3b47d7d2aedae34/modules/holodeckb2b-ebms3as4/src/main/java/org/holodeckb2b/as4/handlers/inflow/CreateReceipt.java#L97 and the new receipt will be sent in both cases.
Does it mean, that if the first user message failed to be delivered, and it receives a duplicate of it, a receipt will be sent anyway?
Thanks