Red Hat
Jul 27, 2015
by Christina Lin
This is a update to my existing demo for people that are getting started to know Fuse, and wants to get their hands dirty and develop a JBoss Fuse project for the first time.

There will be a series of blogs with video coming after this one, it is focus on playing with the integration framework in JBoss Fuse, which base on the open source project Apache Camel. And in the last video of the series I will deploy the integration projects onto the OSGi container and manage it with Fuse Fabric.

The story behind the home loan demo is to prepare housing appraisals base on the content given real estate vendor. The appraisal needs to talk to local database, external google map API and also provide information through a web Restful API.

For those of you have been following my work may know, I have made some changes to the demo, the old demo has place all integration functions in a single project and deploy on single container. But when I started to maintain, because it's been a while from when I developed this project, took me sometime to remember and figure what which part of the application was doing what. Then I started to think it's a better idea if I break it down into separate project, each handles single functions. Now the architecture of this integration project is broken down into 4 separate independent projects and then deploy to containers distributed in the fabric. Using messaging broker as the medium between these distributed integration parts.




In part one, we will start taking in XML files from different vendor's home loan application, they will place their customer input into a directory listening by JBoss Fuse. The XML files are in 2 different formats, one with it's customer data, the other contains housing details. Both files will be place into same folder either by FTP or Batch generated overnight.


To begin, make sure you have download the JBoss Developer Studio to follow along the video:


In this demo, you will learn

File Endpoint
Which provides access to file systems, allowing files to be processed by any other Apache Camel Components or messages from other components to be saved to disk.

Content Base Routing
From the EIP patterns allows you to route messages to the correct destination based on the contents of the message exchanges.

xPath Expression
Allow an Expression or Predicate to be used by parsing in the DSL or Xml Configuration.

Set up the activemq for messaging broker.
The ActiveMQ component allows messages to be sent to a JMS Queue or Topic; or messages to be consumed from a JMS Queue or Topic using Apache ActiveMQ.

  <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
      <property name="brokerURL" value="tcp://localhost:61616"/>
      <property name="userName" value="admin"/>
      <property name="password" value="admin"/>

  </bean>

Hope you find this useful. The source code of the entire project can be found here:
https://github.com/jbossdemocentral/jboss-fuse-homeloan
Original Post