cancel
Showing results for 
Search instead for 
Did you mean: 

Reading and Writing to TOPICs

praveens_p
Champ in-the-making
Champ in-the-making
Need some guidance and recommended approach for the following

A BPMN process (Campaign Flow) listening to Kafka Topics. Campaign flow perform different steps. Each step is an asynchronous flow. Which means that it will  write to an in-topic and will  listen to an out-topic. Based on the Async process result it will perform next steps. This is an event driven architecture and would like to know how we can build this BPMN flow using activity.
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
You'd have to have custom written listener to that topic and start the process instance when a message gets in. You could use a none start event or a message start event (message might be easier to 'identify' which to start, independent of the process definition). There is nothing in Activiti that has such default behaviour.

praveens_p
Champ in-the-making
Champ in-the-making
Thanks. What we are trying to implement is a pub-sub pattern. Each step within the process is an async flow (writing/reading form topic). We don't want the thread to be blocked for waiting for a response. How can we achieve this in Activity ? Is there any way to use messaging patterns with Activiti in a loosely coupled way?

jbarrez
Star Contributor
Star Contributor
Actviiti won't block the thread. Use a 'receive task', or customize the receive task (see for example https://spring.io/blog/2016/02/07/orchestrating-work-with-activiti-and-spring-integration, albeit is's already more complex there). When Activiti encounters a wait state, it will put the state in the database and block no threads.

praveens_p
Champ in-the-making
Champ in-the-making
Thanks very much for explaining. I would like to understand one  more thing. Performance is one of the key thing that we are looking at  and putting state in DB will become an overhead? Also if we use Spring Integration and send a signal event back to the process , if all threads are busy how this processing would happen? Can you please give some details on this

jbarrez
Star Contributor
Star Contributor
The database might become a bottleneck at one point, but database can go a long way before they do that.

Activiti uses the thread of the caller to execute the engine logic. Hence, Activiti itself does not maintain a threadpool (exept for async jobs/timers), so threads being busy is not a problem there.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.