Request/response by message too fast for Camunda

Hi All,

I have a process where I need to call an external computation engine from a camunda process embbeded in a springboot server. The way this engine works is by receiving computation requests by jms messages, and by sending computation status on another jms response queue.

I have configured the workflow as showed below :

image

The activity “Trigger rule computation” calls a delegate that post a request in a JMS file.
And in the java code, there is a java jms listener that correlates received replies with the activity “wait rules computation status” by calling camunda java Api.

The computation can take lot of time (that why it works by request/reply messages), but in certain case, the reply can be very fast (less than 100ms).
When this the case, the problem is that very often, the application try to correlate the message before the process reaches the wait activity, ending with a correlation exception.

Is there a way to manage this. I have already try to set computation request and waiting message activity on parallels branch with an inclusive gateway so that there is a jonction point where the received message can wait, however, there are severals backdraws

  • the process is more complicated and less “business” friendly
  • sometimes, there are some concurrent update of the process. camunda throws an error but manages to retry and to complete the process

Thanks in advance for your replies

This is a known “problem” with camunda. There are several approaches to handle it. The obvious one you already named. Others would be (in no particular order) e.g.:

  • Use an event subprocess
  • Prior to sending the request, start another process that would receive the reply and deliver it to the main process
  • Use zeebe and its buffering capabilities
  • There was a plugin mentioned here in the forums that should do the buffering (I didn’t look into details)
1 Like

Thank you for reply, it really helps,

As I’m new to camunda’s world I wasn’t sure if I had missed something or if I was doing things wrong.