What happens to events that can't be correlated to a process instance?

Hello,

when working with event based processes, events are correlated to process instances via the attribute traceid (as described here).

What happens if an event can’t be correlated to a process instance? For instance, if there is no started instance with the gived id? Does the event get ignored and vanishes? Or is it saved somewhere and can be used (mapped) later? How?

Thank you for any information on this!

Hello my dear!

I believe the behavior is the same for Camunda version 7 or 8.

In version 7 (the version I use daily), if this occurs it will generate a “MismatchingCorrelationException” stating that it cannot correlate the message with the requested ID, and will “ignore” this correlation for this ID in this attempt.

But you can treat this however you want, being able to generate logs of this error, you can throw this event to a queue like Amazon SQS, among several treatments.

ATTENTION: Be careful when working with many events that change values of the same variable, as this may generate a concurrency error (OptimisticLockingException).

Hope I was able to help, my friend!

Regards.
William Robert Alves.

If you want to share the “idea” you have and the behavior you want to get with the events, we can think of something together to solve it.

I’ll be happy to help and share ideas!

William Robert Alves

Yes, I deliberately posted the question to the Optimize topic because I’m not talking about sending message events to BPMN processes (within the proess engine). I’m talking about event based processes in Optimize and events ingestion via the API (as of now, only available in Camunda 7). I thought the topic I posted this to, the words “event based processes” and the link I provided would make it clear.

1 Like