Hello,
How to list uncorrelated buffered messages?
If a client app send a wrong or empty correlation key, we want to be notify, ideally before the TTL expires.
Related question : how’s the buffer protected against flooding?
Thanks for your help.
Hello my friend!
I don’t know if I understand exactly what you need to do, but here’s a tip according to my understanding… that might help you…
Generally when a message is not correlated, it generates a mismatchingCorrelationException, you can also use this to perhaps handle it.
For example, I have a process in my company, which sends all correlations directly to an SQS FIFO queue, when the message tries to be correlated, we have an appropriate treatment according to our needs and there we can even make sending attempts, discarding or throwing later to a deadletter if it is not possible to correlate.
I hope this helps.
William Robert Alves
I’ll leave my code described above here too in case you want to copy…
MessageCorrelationBuilder builder = execution.getProcessEngineServices().getRuntimeService()
.createMessageCorrelation("correlationKey");
builder.processInstanceVariableEquals("correlationKey", objectVariableValue);
List<MessageCorrelationResult> correlationResults = builder.correlateAllWithResult();
if(correlationResults.isEmpty()){
//Here you can do whatever you want with the uncorrelated messages.
}
Hi William,
Thanks for your reply. It seems that your code is for Camunda 7 only.
I can’t find a way (in Camunda 8 with csharp or java clients) to list messages with correlation keys that have never been consumed by the instance.
(case if it is wrongly spelled by a client app for instance)
-v
Oooh I apologize for my lack of attention… I didn’t see that the post was about Camunda 8.
Sorry.
Unfortunately I’m not very knowledgeable about Camunda 8, but I’m studying, I hope to soon be able to help with this version of Camunda too!
William Robert Alves
Hi @vincentgiraud,
right now, the message execution is exported by Zeebe into elastic search. The expired messages are exported in batch with a delay.
The team is working on a feature request to make the messages visible in Operate.
Hope this helps, Ingo
Hi @Ingo_Richtsmeier,
Glad to hear the team is working on this feature request. Will an Operate admin with the right permission be able to batch delete/purge them?
Any target release?