Message Correlation Exception while running parallel processes

Hi ,

I am running 450-900 parallel processes and i have multiple receive event in the workflow . Whole process is failing miserably because process engine is not able to correlate the message. I have tried the the suggestions in the previous discussions to make it parallel and make the parallel task async before but still its not working. I can see events are coming pretty fast in the system and while correlating it its failing.

I am using camunda-bpm-spring-boot-starter-webapp 2.3.0 .

Please suggest some solution its very urgent.

How exactly are you try Correlating the messages?
How are they failing exactly?
Please provide more information on what you’ve tried and what the results of those attempts where.

diagram_1.bpmn (70.8 KB)

I am running the diagram_1.bpmn parllely using the parent process.

I am testing by running the child flow 450-900 times parallel manner. Initially the receive events were sequential but when that didn’t worked I looked for the solution in the forum and then changed it to parallel and
async before true.

I am correlating the messages after receiving the JMS message in the system, I am listening to a AMQP queue and on receiving certain event I am correlating it to receive event message.

Ex: processEngine.getRuntimeService()
.createMessageCorrelation(“cartRBBootNoneEvent-” + dto.getInventoryNo()).setVariables(delegationMap).correlate();

What exactly isn’t working?
Is there an error being thrown?

Its not able to correlate the the messages.

Exception example :

org.camunda.bpm.engine.MismatchingMessageCorrelationException: Cannot correlate message ‘cartridgeRBBuildPowerOnEvent-62439’: No process definition or execution matches the parameters

Did you get chance to look at the workflow … does it looks fine to you?

Hi Niall,

Its able to correlate the early messages but as the messages becomes more it starts failing… its not failing for everything.

I’m not really sure how any of those messages end up being correlated considering in the diagram you’ve uploaded, not of the receives tasks seems to have any message name specified.

Hi Niall,

Its there it was a copy paste error. Resending you the bpmn. diagram_1.bpmn (71.5 KB)

Hi Niall,

Did you get chance to look into above?

I need more details about your setup - what database are you using? is it clustered?
What version of Camunda? how many nodes?

Hi Niall,

We are using Maria Db as a service on Pivotal Cloud Foundary platform. Yes we are using clustered setup with 2 -4 nodes. We are using camunda 7.8 version.

Is Maria DB clustered?
There’s a known issue about this:

Hi Niall,

If we go with in-memory H2 database, will it work fine?


I had a quick look at your model. There are numerous opportunities for race conditions between the process waiting for messages, then abandoning the wait via say an interrupting timer boundary. Thus if the actual message subsequently arrives, there will be not be a process instance to correlate to.

In addition, there are opportunities for the process to be waiting on the same message twice. Thus if a message arrives, one execution will correlate to the message, the other may not. Thus it could appear that correlation has not occured and there will be no error…

To avoid these situations:

  • Carefully consider your parallel forks and joins, these could lead to tricky behaviour.
  • Consider nested event driven sub processes for your event correlation, consider modelling a finite state machine rather than a complex linear process flow.
  • Understand that you have intrinsic race conditions between inbound messages and process receive tasks with timer boundary events…



Hey Rob,

Thanks a lot for your response, can you pls provide a example flow for nested event driven sub process. I am new to Camunda this help will be highly appreciated. If you can just draw a sample flow and put it here or some link that would be of great help.


Hi Sim,

Heres [1] a refernece to the docs and examples…



Hi Som,

Also heres a link to a state machine implementation with event driven sub-processes. Thus this may give you inspiration. I find event driven sub-processes are great for catching messages. In some states the message is meaningless, however its useful to correlate the message to a null processs such that the message client gets positive acknowledgement its message was delivered…