Exit by message receipt from sub-process and timeout triggered simultaneously


We have some process where we are waiting for some message event with timeout.

We see that sometimes both exits triggered simultaneously at the same time:

  • exit on message receipt
  • exit on timeout
    as result we have a mess in results.

see the schema below:

Deployment details:

  • two similar Spring boot application that use the single data-base for Camunda…

If the race condition possible for the case described above?
May be some kind of best practice or workaround may be applied here to avoid concurrent trigger for such cases?