-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration-processor-camel-routes-new-dmz.xml
34 lines (34 loc) · 1.4 KB
/
registration-processor-camel-routes-new-dmz.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<routes xmlns="http://camel.apache.org/schema/spring">
<!-- Packet-Reciever to packet-uploader Route -->
<route id="packet-reciever-->packet-uploader new route">
<from uri="vertx:packet-receiver-new-bus-out" />
<log
message="packet-reciever-->packet-uploader new ${bodyAs(String)}" />
<choice>
<when>
<simple>${bodyAs(String)} contains '"isValid":true'</simple>
<process ref="tokenGenerationProcessor"/>
<setHeader headerName="CamelHttpMethod">
<constant>POST</constant>
</setHeader>
<setHeader headerName="Content-Type">
<constant>application/json</constant>
</setHeader>
<setHeader headerName="Cookie">
<simple>${header.Cookie}</simple>
</setHeader>
<setBody>
<simple>${bodyAs(String)}</simple>
</setBody>
<to uri="http://161.97.120.69:30080/registrationprocessor/v1/securezone/notification" />
</when>
<when>
<simple>${bodyAs(String)} contains '"internalError":true'</simple>
<to uri="vertx:retry-bus-in" />
</when>
<otherwise>
<to uri="vertx:error-bus-in" />
</otherwise>
</choice>
</route>
</routes>