Camunda 8 Message Correlation - as external system I want to know if correlation has been successful

Hi folks,

with Camunda 8 I love that we now have message buffering and external systems can emit messages before a process arrives at the catch event.

But there are still cases, where - as external system - I want to know if message correlation has been succuessful right when sending the message. Which is that I want to get a result which informs me if a corresponding process instance has been found or not.

Because in that case I’m not interested in buffering I use Spring Zeebe Client with TTL=0 as follows:

var result = client.newPublishMessageCommand()
				.variables(Collections.singletonMap(XXX_DATA, xxxData))

Sadly the result - of type PublishMessageResponse - only has a message key as result. And I always get such a message key. Totally independent of the question whether an existing process instance with the right correlation key exists or not.
With a TTL of Zero I would have expected to get either an appropriate exception or some flag in the result in order to know if my action has been successful or not.

Maybe I’m just missing a small detail here - and I would be happy to know how to achieve this. Any ideas?

Thanks in advance

Hey Gunnar,
I love your question! - You are completely correct in your “observation”. Apparently there is currently no possibility to get the information if the actual correlation was successful.

Good thing though: We are well aware of this and are looking for possibilities to fix this :slight_smile:



I came up with the exactly the same question while evaluating Camunda for an upcoming customer project.

I’d like to opt for Camunda Platform 8, but this limitation may be a blocker, as the project code need to perform some intelligent process integration, such as verifying if any currently running processes instance are able (in their current state) to pick up and process a concurrent external event about the target item, only creating a dedicated new process instance to handle it otherwise.

In an embedded Camunda 7 solution I could, as far as I understood, attempt to correlate a message and (synchronously) examine the correlation results to make the decision, using the MessageCorrelationBuilder.correlateWithResults APIs.

Do you guys have any plan about improving the zeebe java client to support this use case?

In the meantime, do you have any suggested pattern to achieve a similar with Camunda Platform 8? For example, could starting a specific dedicated process (and delegate to it the decision) help in some way? Would this process be in a better position to decide what to to do, using standard BPMN constructs? (I’m not able to figure out the details of such a workaround at the moment.)

Thank you very much in advance

Hey @cosmacol!
Thanks for your feedback - appreciate it. :slight_smile:
I will route it to our product management to get some information if and when this functionality is planned to be added. Maybe @aleksander-dytko or @felix-mueller can shed some light on this right away?

So far I am not aware of any workaround either…

1 Like