I am trying to test process communication between processes and encounters a problem that i do not understand:
I have modeled 2 process: a producer and a consumer.
In the producer, i send a message to the consumer.
In the consumer, i receive the message and sends a message back to the producer.
My problem is that the sending of the message and consuming in the comsumer is a blocking operation.
So i cant send a message back to the producer because the producer is still sending and not listening
i’ve solved the problem by sending the message in a new thread in the java delegate code, but i think this is not the way bpmn and camunda works.
So how can i send a message that do not block my process until the consumer of the message is finished?
I tried all combinations of Async Continuations, but then nothing works.
Hint: I started one in-memory process engine in a spring boot app, then i deployed both processes and starting an instance of the producer-process.
I think you have to change the consumer so that it sends the synchronous reply immediately. And then does the real “consuming” work asynchronously.
I try to send the message immediatly, but this fails because no one is listening…
Both consumer and producer are running in the same thread (i dont not know why a process that is started by sending a message is in the same thread). I did not start the comsumer-process by myself, i just sending the message to the consumer
within the consumer, i cannot send (correlate) the answer-message because the producer is not listening. The producer does not continue its work in his own process and so the intermediate message catch is not active.