camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmh <>
Subject how to process json and dispatch to several processors
Date Mon, 10 Nov 2014 15:43:02 GMT
I have a simple use case I am trying to implement.
We will be receiving data from websocket.
I am thinking about using poll consumer pattern to test for now.
Essentially I will have the following json coming thru the activemq queue. 

{name: abc
  address: xyz

Where the json does not really matter but how I dispatch the data to
different components is what I am looking for.
I need to be able to rout the json data to different components. I am
thinking about using jsonpath.

Something like this?

"$.kind"), ExpressionBuilder.constantExpression("full")))

But the components will be the same just need t send the value of name
(example above) to some component that will do the processing (calling the
db  to do some querying)
So essentially this is the work flow.

Receive a json
Read the json and dispatch the value of the json to some processor to do
some type of querying against the database (find name in db) .  Do this for
each json name:value pair (json wil not change, will always have the same
name:value pairs)  Combine the result for each name:value pair.

Any pointers/ideas as how to implement this type of processing? What kind of
patterns should I implement? Any simple code snippets to illustrate the
I am also thinking about leveraging Akka for this pattern as well since we
have potentially many millions of records and will need to ensure the
processing is done per json and concurrency is guaranteed.

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message