File tree Expand file tree Collapse file tree 7 files changed +39
-3
lines changed
activemq-data/demo/KahaDB Expand file tree Collapse file tree 7 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 1
1
routing /target
2
+ routing /activemq-data
3
+ routing /src /data /error
4
+ routing /src /data /outbox
Original file line number Diff line number Diff line change 77
77
78
78
<camelContext trace =" false" xmlns =" http://camel.apache.org/schema/spring" >
79
79
<propertyPlaceholder location =" fabric8/route.properties" id =" properties" />
80
+ <endpoint
81
+ uri=" dozer:transformCSV?unmarshalId=csv& marshalId=myjson& mappingFile=transformations/csv2json.xml& targetModel=org.globex.Account"
82
+ id=" transform" />
80
83
<dataFormats >
81
84
<json library =" Jackson" unmarshalTypeName =" org.globex.Account" id =" json" />
85
+ <json library =" Jackson" id =" myjson" />
86
+ <bindy type =" Csv" classType =" org.acme.Customer" id =" csv" />
82
87
</dataFormats >
88
+
89
+
90
+
91
+ <onException >
92
+ <exception >java.lang.IllegalArgumentException</exception >
93
+ <handled >
94
+ <constant >true</constant >
95
+ </handled >
96
+ <to uri =" {{fileError}}" />
97
+ </onException >
98
+
99
+ <route >
100
+
101
+
102
+ <from uri =" {{fileInput}}" />
103
+ <split >
104
+ <tokenize token =" \n" ></tokenize >
105
+ <to ref =" transform" />
106
+ <to uri =" {{fileOutput}}" />
107
+ </split >
108
+ </route >
109
+
110
+
111
+
112
+
113
+
114
+
115
+
83
116
<route id =" RestService" >
84
117
<from uri =" cxfrs:bean:customerRestService?bindingStyle=SimpleConsumer" />
85
118
<bean ref =" changeGeo" />
Original file line number Diff line number Diff line change 1
- fileInput =???
2
- fileOutput =???
3
- fileError =???
1
+ fileInput =file://src/data/inbox? fileName =customers.csv& noop =true
2
+ fileOutput =file://src/data/outbox? fileName =csv-record-${date:now:yyyyMMdd}.txt
3
+ fileError =file://src/data/error? fileName =account-${property.CamelSplitIndex}.json
You can’t perform that action at this time.
0 commit comments