How can I ignore the Mismatching Message Correlation Exception to avoid Transaction rollback Exception

I recently came across a Camunda forum post regarding the resolution of Transaction rollback exceptions, particularly in the context of using correlateAll instead of correlateWithResult.

However, I find myself facing a dilemma wherein we require both the correlation result and the ability to proceed with subsequent task evaluations based on this result. While I understand your recommendation to use correlateAll for handling the Transaction rollback exception, I’m concerned about its void nature, which doesn’t allow for returning the necessary result.

Any other solution than this

Hi @Shiza_Tariq and welcome to the forum.

One thing that directly comes to my mind is querying for the message subscription beforehand.
You could use an event subscription query to check, whether there is any process instance currently waiting for your message correlation (and therefore no exception would be thrown, if you then only correlate when the subscription exists).

1 Like

Thanks. Your solution has also worked. I’m mentioned one more post link here for others. We can remove this exception by using this solution as well.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.