Control camunda with rabbitmq , microservices

Hello guys ,
I am new with cammunda so i would like to ask you for advice. I am working on one microservice application with orchestration. I want to make it full asynchronous. I was looking on some tutorials but i am not sure how to control flow by me. If i implement JavaDelegates i assume that flow is running till end.
I have to do something like on screen. I mean when i enter task A i will send event to rabbit and it will distribute some logic to microservices when that is done rabbit will notify flow that everything is OK and flow can continue to task B.
May i ask you for advice how to achieve that flow will wait for response event from rabbit ?
Thank you.

I think it might worth reading through the docs on how transactions perform in processes. Generally there are a lot of considerations when communicating with a message system, but the first thing is to understand how the engine’s transactions run by default and how you can use things like async before/after on symbols to ensure the transaction is committed before continuing.

1 Like

Thank you for answer Niall.
I found that docs and read it but i am not sure if i understand that correctly. Som Java small example would be helpfull but what i understand i can have in model service tasks and i will add in modeler execution listeners with end to each task.
Then delegate classes have to implement listners as well and when i start delegate make some logic it will wait while End listener is called by some rabbit consumer event ?

I will try better specify what is unclear for me. I start flow and i am in ServiceTask A then i send rabbit message to service then flow should wait. Rabbit send message back rabbit listener in camunda service catch message and now should tell to service task A to move to service task B and i am not sure how to create this event to continue to another service task

So i found out solution :

After each service task i attached message so flow will wait while rabbit send this message to flow.

1 Like

I’m using this strategy in many projects. Please be aware that sometimes your external consumer will consume your message and produce a new one so fast that camunda hasnt moved to the Message Catch Event listener yet. You need to implement some kind of retry when your correlation result has length 0 or any error.