All Projects → santoshjoshi → camel-bindy-example

santoshjoshi / camel-bindy-example

Licence: other
camel Bindy Example

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to camel-bindy-example

Octobox
📮Untangle your GitHub Notifications
Stars: ✭ 4,137 (+31723.08%)
Mutual labels:  inbox
modules
Java & REST API's for creating and running integrations
Stars: ✭ 16 (+23.08%)
Mutual labels:  camel
hawtio-integration
Core integration plugins for Hawtio: Apache ActiveMQ, Camel, Karaf, OSGi, and Spring Boot
Stars: ✭ 26 (+100%)
Mutual labels:  camel
Wmail
The missing desktop client for Gmail & Google Inbox
Stars: ✭ 2,093 (+16000%)
Mutual labels:  inbox
wring
Smart Inbox for GitHub Notifications
Stars: ✭ 28 (+115.38%)
Mutual labels:  inbox
camel-kafka-connector-examples
Apache Camel Kafka Connector Examples
Stars: ✭ 45 (+246.15%)
Mutual labels:  camel
messenger
Laravel messenger. A full messenger suite for your new / existing laravel app! Private and group threads between multiple models, with real-time messaging, reactions, attachments, calling, chat bots, and more!
Stars: ✭ 194 (+1392.31%)
Mutual labels:  inbox
inbox-by-gmail-checker
Displays the number of unread messages in Inbox by Gmail. You can also click the button to open your inbox.
Stars: ✭ 66 (+407.69%)
Mutual labels:  inbox
pascalcase
Convert a string to pascal case (upper camel case). Used by more than 8.7 million projects on GitHub! Please follow this library's author: https://github.com/jonschlinkert
Stars: ✭ 35 (+169.23%)
Mutual labels:  camel
akka-microservice
Example of a microservice with Scala, Akka, Spray and Camel/ActiveMQ
Stars: ✭ 45 (+246.15%)
Mutual labels:  camel
camel-lsp-client-vscode
This is a client implementation of the Apache Camel Language Server Protocol for Visual Studio Code
Stars: ✭ 24 (+84.62%)
Mutual labels:  camel
emaile2e-javascript-client
Test email integration with your app using MailSlurp
Stars: ✭ 14 (+7.69%)
Mutual labels:  inbox
camel-k-examples
Apache Camel K Examples
Stars: ✭ 48 (+269.23%)
Mutual labels:  camel
Inboxrecyclerview
Build expandable descendant navigation, inspired by Google Inbox
Stars: ✭ 1,953 (+14923.08%)
Mutual labels:  inbox
clj-camel
The library adds a thin idiomatic layer on top of Java Apache Camel
Stars: ✭ 38 (+192.31%)
Mutual labels:  camel
n1-agapanthus
Nylas N1 theme, inspired on Inbox by Google and based on Taiga.
Stars: ✭ 28 (+115.38%)
Mutual labels:  inbox
camel-cxfrs-example
Camel CXF Rest Example with JSON
Stars: ✭ 31 (+138.46%)
Mutual labels:  camel
kamel
Kotlin DSL for Apache Camel
Stars: ✭ 15 (+15.38%)
Mutual labels:  camel
camel-extra
Additional components for the Apache Camel integration framework
Stars: ✭ 32 (+146.15%)
Mutual labels:  camel
further-cdi
🔊 Going further with CDI presentation
Stars: ✭ 28 (+115.38%)
Mutual labels:  camel

Camel Bindy Example

The Example is about utilizing features provided by Camel Bindy Component

About The Example

Currently there are parts two examples

Example 1
 This is a simple example that shows the marshalling and unmarshalling capability of Camel Bindy Component

It reads a large text file delimited with '|' (pipe) and each new record delimited with '\n' (new line) process it and saves it back to another text file after adding some other information, the input and output data file formats are shown below

######Input file format id|name|semester|java|c|dbms|mathematics|datastructure

 1|Student 1|1st|80|56|54|90|90
 2|Student 2|1st|50|65|75|90|60  

######Output File format id|name|semester|grade|total score|result

 1|Student 1|1st|A|370|Pass
 2|Student 2|1st|A|340|Pass 

#####Camel Route 1

A Camel route is written that executes as below

  1. Reads a txt huge text file(student.txt) delimeted with '|' from inbox/csv directory
  2. Unmarshals it to a JAVA POJO
  3. Process POJO
  4. Create another POJO during processing
  5. Marshal the pojo back to new file (studentResult.txt) in outbox/csv/simple directory after processing

============================================================================================================

Example 2
  A simple Bindy Example to test the one to many capabilities using csv data binding.
  In this example we are depicting a simple one to many Department to Employee relationship.

######Input A java pojo Department with multiple employees will get generated using the method generateEmployeeDepartmentModel from "org.apache.camel.example.util.ModelGenerator.java".

 here we are using camel bean component.
 <camel:bean ref="modelgenerator" method="generateEmployeeDepartmentModel" />

######Output file format id|name|semester|grade|total score|result 1|Coumpters|1|first-name-1|last-name-1|2012-11-10|9876543210

#####Camel Route 2

The Camel route executes as below:

  1. The Timer component "bindyonetomanyTimer" executes the route
  2. It then calls generateEmployeeDepartmentModel method in "org.apache.camel.example.util.ModelGenerator.java" to get a department and its employee
  3. The department pojo is marshaled using csv data binding and appended to a file

============================================================================================================

Example 3
  In this example we are exploring  Bindy Capabilities For:
    a. Processing Fixed Length Format
    b. Date and number formatting, padding, trimming and alignment 

######Input file format Name, Debut Date, Country , Mathes palyed, Runs scored, Average, Strike rate, Batting posion, Reteriment Date

 Rahul Dravid      1996-09-10INDIA       00160  9,30060.5480.54 42012-09-01

#####Camel Route 3

The Camel route executes as below:

  1. Reads the fixed length file(player.txt) from inbox/fixedlength directory
  2. Unmarshal it to a Java POJO
  3. Logs the POJO to console

============================================================================================================

Example 4
 This example is just the reverse of example 3 , it marshalls a pojo back to file using the fixed file format

######Input A java pojo Player is generated using the method generatePlayerModel from "org.apache.camel.example.util.ModelGenerator.java".

 again here we are using camel bean component.
 <camel:bean ref="modelgenerator" method="generatePlayerModel" />

######Output file format Name, Debut Date, Country , Mathes palyed, Runs scored, Average, Strike rate, Batting posion, Reteriment Date

 Rahul Dravid      1996-09-10INDIA       00160  9,30060.5480.54 42012-09-01

#####Camel Route 4

The Camel route executes as follows:

  1. The Timer component "bindymarshallingtimerTimer" executes the route
  2. It then calls generatePlayerModel method in "org.apache.camel.example.util.ModelGenerator.java" to get player's detail
  3. The Player pojo is marshaled using fixed length data binding and written to a file

============================================================================================================

Example 5
  A simple fix example to show bindy capabilities for processing of fix messages.

######Input file format 8=FIX.4.1�9=90�35=0�49=INVMGR�56=BRKR�34=236�52=19980604-07:59:30�10=225�

#####Camel Route 5

The Camel route executes as below:

  1. Reads the FIX protocoled file(fix-simple.txt) from inbox/fix/simple/ directory
  2. Unmarshal it to a Java POJO
  3. Logs the POJO to console

============================================================================================================

Example 6
  A FIX example to explore FIX messages with:
    a. Header, Body and Trailer

######Input file format the file has the same format (as in example 5), but the difference is the way marshalling is done it uses three classes(check code).

 8=FIX.4.1�9=90�35=0�49=INVMGR�56=BRKR�34=236�52=19980604-07:59:30�10=225�

#####Camel Route 6

The Camel route executes as below:

  1. Reads the FIX protocoled file(complex.txt) from inbox/fix/complex/ directory
  2. Unmarshal it to a Java POJO
  3. Logs the POJO with Header ,Body and sections info to console

============================================================================================================

#####Setting up the Example

  1. check out the example
  2. execute mvn camel:run

If you want to run only one example and stop or pause execution of other example then please set autoStartup="false" (currently true for all routes) for all routes you don't want to get executed.

#####References Fix protocol

Bindy details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].