holodeck-b2b/Holodeck-B2B

Duplicate message will generate a receipt even if the delivery is failed?

tigran-a opened this issue · 1 comments

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

Later, in CreateReceipt, there is no difference between DELIVERED and DUPLICATE state for receipt creation

if (currentState == ProcessingState.DELIVERED || currentState == ProcessingState.DUPLICATE) {

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

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.