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.
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).