Re: Design: State Machine implementation in Apache Camel

2018-01-12 Thread Steve973
For your first point, when you say that you save the route names in a table, do you mean something like a camel Routing Slip , or a data structure of your own? Consider using the Dynamic Router feature if you h

Re: Design: State Machine implementation in Apache Camel

2018-01-11 Thread Imran Raza Khan
I have change a design like below I already have multiple camel sub routes which perform different actions, now my requirement was to align those sub routes in one flow for order fulfillment. 1- For every new product i knew which sub routes suppose to be execute and in which sequence, so i will

Re: Design: State Machine implementation in Apache Camel

2018-01-11 Thread Steve973
Thanks for the clarification, Owain. Imran, are your states the same across all of your nodes/systems? I agree that orders always have a particular state, and they consequently have rules for state transitions. Can you elaborate a little bit more on how you can have a hundred different states fo

Re: Design: State Machine implementation in Apache Camel

2018-01-10 Thread Owain McGuire
Steve, I was meaning the Pub/Sub pattern in general so there are many solutions. I have just been using Google Pub Sub which I found very straightforward on Camel but look at the examples on Github as a starter. Also with the Google Pub Sub API you can programmatically define topics and subscr

Re: Design: State Machine implementation in Apache Camel

2018-01-10 Thread Steve973
Imran, This seems like a complexity and maintenance nightmare. You might want to rethink your approach for simplicity and maintainability. I don't know your exact requirements and all of your use cases, but it might help if you can normalize and generalize a bit to streamline the process. At th

Re: Design: State Machine implementation in Apache Camel

2018-01-10 Thread Owain McGuire
Imran, Have you thought of a publish/subscribe model where each topic triggers multiple subscriptions. Perhaps have a look at Google pub/sub component. HTH. O. > On 10 Jan 2018, at 18:23, Imran Raza Khan wrote: > > Hi Steve, > > Thanks for detail reply. > > - I will evaluate StatefulJ if

Re: Design: State Machine implementation in Apache Camel

2018-01-10 Thread Imran Raza Khan
Hi Steve, Thanks for detail reply. - I will evaluate StatefulJ if it fits into my requirements. >> With Camel, I prefer to route a message, and then hand off the work as fast as possible, and then free up the routing to handle more messages. To separate concerns, if the action being performed i

Re: Design: State Machine implementation in Apache Camel

2018-01-09 Thread Steve973
I wouldn't roll my own state machine in Camel or any other application, since that wheel has been invented already. Why use a table when you can utilize something like StatefulJ that will allow you to define states, transitions, etc? I would probably also leave your business logic outside of came