Issue with sub-process and dropped messages

Hi all,

I have a workflow, with a sub-process, as per the below (a simplified version of our actual production workflow).

Following the publish of the Kafka event to another system in the “Send a Kafka event” step, the system replies ‘quickly’ within 50ms or so. However, at the point the response has been received, the sub-process “Wait for ACK’s” doesn’t seem to exist, so the message is dropped and the workflow doesn’t proceed.

This shows in the logs as

org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message 'downstream-response': No process definition or execution matches the parameters

For responses that are ‘slower’, the sub-process exists and is therefore able to correlate the response back to the sub-workflow as expected.

Is there a best practice for accommodating this scenario?


Thanks

This is a known issue for C7.
Apparently C8 handles it correctly.

The usual workaround is to put a Parallel Gateway before both the send and move the Wait subprocess to be be in parallel to it. Then put a Parallel Join after the two of them so that the process can’t end until both parts complete.

You also need to set an “Async” on one of the steps (I think it is Async Before on the receive) to force the engine to see that there’s a receive waiting.

It’s a less than ideal setup.