Sync between message & event based gateway

Hi!

We have a more complicated design than this example but I just put a brief just explain better. We have 2 processes communicating by messages and there is a gateway waiting for a message. The issue we have is that we need to put a 1sec timer because at the time we sent the message the event gateway is not ready yet to get the message, so my question is how is the proper way of handling this scenario or how do I need to send the message to the gateway at the right moment?

Hi @alainosorio,

a possible alternative is describes here: Subprocess, KAFKA, external system No process definition or execution matches the parameters - #4 by Ingo_Richtsmeier

Hope this helps, Ingo

Hi @Ingo_Richtsmeier

is a great solution but in our case we want to stay in camunda for the workflow continuation, the 1sec timer works but do you think is a VALID solution in terms of best practices?

Hi @alainosorio,

you solution is valid. It is easily understandable, even easier than the solution I scetched in the linked post.

Downside: You can not rely on the one second that you put in the timer definition. Caused by the implementation of the Job Worker in the process engine, it could take longer to execute your timer as it depends on the load. Lower load means longer cycle times, the job workers delays the execution.

In case you don’t worry to send the answer after around 10 seconds, I would pick your model as well.

Hope this helps, Ingo

Thanks @Ingo_Richtsmeier your advice has been very helpful

In the scenarios like these that we had, we had to design the event based gateway with explicit timer, it need not be 1 second we can set it to max time the process can wait without breaking the process level SLAs