holodeck-b2b/Holodeck-B2B

I received a receipt immediately followed by a nonreceipt for the same message

JohnHughesAtlantech opened this issue · 2 comments

Version: holodeckb2b-5.3.1

The holodeckb2b log shows:

2022-03-31 14:43:01,301 (pool-2-thread-8)[INFO ] org.holodeckb2b.core.submission.MessageSubmitter - User Message succesfully submitted, messageId=2019493051-1-0@as4.calvaedi.com
2022-03-31 14:43:01,301 (pool-2-thread-8)[INFO ] org.holodeckb2b.backend.file.SubmitOperation - User message from 2019493051-1-0.mmd succesfully submitted to Holodeck B2B
2022-03-31 14:43:17,454 (pool-2-thread-1)[INFO ] org.holodeckb2b.msgproc.AS4.REQUEST_OUT_FLOW.CheckSentResult - User Message with msg-id [2019493051-1-0@as4.calvaedi.com] is being sent
2022-03-31 14:43:17,557 (pool-2-thread-1)[INFO ] org.holodeckb2b.msgproc.AS4.REQUEST_OUT_FLOW.CheckSentResult - Processing state for message unit [2019493051-1-0@as4.calvaedi.com] changed to AWAITING_RECEIPT
2022-03-31 14:43:17,561 (pool-2-thread-1)[INFO ] org.holodeckb2b.msgproc.AS4.REQUEST_IN_FLOW.ReadReceipts - Receipt [msgId=23776783-b0f0-11ec-b0e1-00505686c03e@domibus.eu] received for message with id:2019493051-1-0@as4.calvaedi.com
2022-03-31 14:43:17,581 (pool-2-thread-1)[INFO ] org.holodeckb2b.msgproc.core.REQUEST_IN_FLOW.ProcessReceipts - Receipt received for User Message [msgId= 2019493051-1-0@as4.calvaedi.com] => successfully delivered
2022-03-31 14:43:17,688 (pool-2-thread-7)[WARN ] org.holodeckb2b.core.receptionawareness.RetransmissionWorker - Message [2019493051-1-0@as4.calvaedi.com] cannot be resent due to missing Reception Awareness retry configuration in P-Mode [douanes-luxembourg-send]
2022-03-31 14:43:17,692 (pool-2-thread-7)[INFO ] org.holodeckb2b.core.receptionawareness.RetransmissionWorker - Retry attempts exhausted for User Message [msgId=2019493051-1-0@as4.calvaedi.com]!

ebms_errors.log:

2022-03-31 14:43:17,692 [errors.missingreceipts]- No Receipt received for UserMessage with messageId=2019493051-1-0@as4.calvaedi.com

soap_in.log shows the receipt of a correct looking receipt.

Why is holodeck trying to resend a message after having received a valid receipt?

What happens here is that the Receipt from the partner arrives at the same time as Holodeck B2B checks whether it should resend a message because it didn't receive a Receipt yet. This creates a race condition which is not handled correctly and therefore you receive both the Receipt and MissingReceipt Error.

This condition can arise when you haven't specified retries in the P-Mode. Adding a retry configuration to the P-Mode will prevent this issue from occurring.

Ok, thanks. Will add retries to see if that avoids the race.