Camel SE and wire-tap EIP

Working on the Open ESB Camel SE, developing a more real world content-based-routing example, the new example now provides some logging.

By using the multiple String argument form of to (Fluent Builders Java DSL) I was able to have some POJOs get control before and after a message was sent to a target BPEL process.

PORouter3/PORouter/PORouterCamelJBIModule/src:
org/camelse/examples/porouter/AppRouteBuilder.java
  // Routes based on expression evaluation
  //(POJOs write messages to log)
  from(jbiInURI).
    choice().
      when(orderPriceGT500).
        to("bean:LogPOJO1", jbiBpel2DbURI,"bean:LogPOJO1").
     otherwise().
        to("bean:LogPOJO2", jbiBpel2FileURI,"bean:LogPOJO2");

Each POJO logs the message with the POJO’s name (so I can see which route was taken).  This is a slightly different approach to Apache Camel’s wire-tap EIP.

The order in which the messages appear within the log (and the timestamps) distinguish before from after for each POJO.

Category: camel se, open source, open-esb

posted by Mike Wright on: October 24, 2008

Tags:

Leave a Comment

You must be logged in to post a comment.

More blog posts...

Next post: SOA Friday #3