Skip to content

Commit

Permalink
Update to Fuse_ESB_7.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Wim Verreydt committed Mar 22, 2013
1 parent 197011e commit b0a4433
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .gitignore
@@ -0,0 +1,6 @@
target
*.i??
.idea
.settings
.project
.classpath
54 changes: 50 additions & 4 deletions README.md
@@ -1,11 +1,10 @@
File Batch Splitter Camel Project
=================================
# File Batch Splitter Camel Project

This project demonstrates how to consume files from the file system and split the content of the file into multiple messages using Apache Camel.

The sample implements the Splitter EIP (Enterprise Integration Pattern) which splits an incoming message into a series of outgoing messages. Each of the outgoing messages contains a piece of the original message.

A sample incoming message file 'batch1.xml' is located in src/data/inbox. When the route is run, the split result files will be located in target/data/outbox.
A sample incoming message file 'order1.xml' is located in src/data/inbox. When the route is run, the split result files will be located in target/data/outbox.

This project was created with FuseSource Camel IDE available at http://fusesource.com/products/fuse-ide-camel/ which gives you a nice visualization of your routes, the ability to drag and drop Apache Camel components to design and edit routes, and testing capabilities within the Eclipse IDE.

Expand All @@ -18,4 +17,51 @@ To run the example project as a standalone Camel route, execute the following co
For more help see the Apache Camel documentation

http://camel.apache.org/splitter.html


---

# File batch Splitter with Fuse


You can also run this bundle by installing it into Fuse ESB

To build the project and execute the unit test, execute the following command:
$PROJECT_HOME> mvn clean install

Start Fuse ESB, by running the included start script

$FUSE_ESB_HOME> ./bin/fuseesb

Now You can install the bundle using the Fuse console

FuseESB:karaf@root> osgi:install mvn:com.fusesource.byexample/FileBatchSplitter/1.0.1

You can see that the bundle is installed by running the list command

FuseESB:karaf@root> list
...
[ 250] [Installed ] [ ] [ ] [ 60] File Batch Splitter (1.0.1)
...

In this case, 250 is the bundle id. This can be different on your instance of Fuse. You can start this bundle by
executing `osgi:start (bundle-id)`.

FuseESB:karaf@root> osgi:start 250
FuseESB:karaf@root> list
...
[ 250] [Active ] [ ] [Started] [ 60] File Batch Splitter (1.0.1)
...

To activate this route, you have to copy the `order1.xml`file to the `$FUSE_ESB_HOME/src/data/inbox` folder. So you open
a new console...

$PROJECT_HOME> cp src/data/inbox/order1.xml $FUSE_ESB_HOME/src/data/inbox/


If we go to the `$FUSE_ESB_HOME/target/data/outbox` folder, you can see te resulting files.

item1-2013032213582300693.xml
item2-2013032213582300693.xml
item3-2013032213582300693.xml
item4-2013032213582300693.xml
item5-2013032213582300693.xml
14 changes: 11 additions & 3 deletions pom.xml
Expand Up @@ -22,7 +22,7 @@

<groupId>com.fusesource.byexample</groupId>
<artifactId>FileBatchSplitter</artifactId>
<packaging>jar</packaging>
<packaging>bundle</packaging>
<version>1.0.1</version>

<name>File Batch Splitter</name>
Expand All @@ -33,7 +33,7 @@
</organization>

<properties>
<camel-version>2.8.0-fuse-02-05</camel-version>
<camel-version>2.10.0.fuse-71-047</camel-version>
<slf4j-version>1.6.2</slf4j-version>
</properties>

Expand Down Expand Up @@ -78,7 +78,7 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
<artifactId>camel-test-spring</artifactId>
<version>${camel-version}</version>
<scope>test</scope>
</dependency>
Expand Down Expand Up @@ -117,6 +117,14 @@
<version>${camel-version}</version>
</plugin>


<!-- to generate the MANIFEST-FILE of the bundle -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit b0a4433

Please sign in to comment.