-
Notifications
You must be signed in to change notification settings - Fork 16
/
camel-log.xml
68 lines (54 loc) · 2.8 KB
/
camel-log.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0"?>
<!--
Copyright 2005-2016 Red Hat, Inc.
Red Hat licenses this file to you under the Apache License, version
2.0 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.
-->
<!--
This is the OSGi Blueprint XML file defining the Camel context and routes. Because the file is in the
OSGI-INF/blueprint directory inside our JAR, it will be automatically activated as soon as the bundle is installed.
The root element for any OSGi Blueprint file is 'blueprint' - you also see the namespace definitions for both the Blueprint
and the Camel namespaces.
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.2.0"
xsi:schemaLocation="
http://www.osgi.org/xmlns/blueprint/v1.0.0
https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.3.0
http://aries.apache.org/schemas/blueprint-ext/blueprint-ext-1.3.xsd">
<ext:property-placeholder evaluator="fabric8" placeholder-prefix="$[" placeholder-suffix="]"/>
<bean id="myBean" class="io.fabric8.quickstarts.camel.log.MyBean">
<argument value="$[k8s:map:camel-log/message]"/>
</bean>
<!--
The namespace for the camelContext element in Blueprint is 'http://camel.apache.org/schema/blueprint'.
While it is not required to assign id's to the <camelContext/> and <route/> elements, it is a good idea
to set those for runtime management purposes (logging, JMX MBeans, ...)
-->
<camelContext id="log-example-context" xmlns="http://camel.apache.org/schema/blueprint" >
<!--
A very simple Camel route, that uses a timer to trigger a message every 5 second.
The <setBody> sets a body into the Camel Message.
The <log/> elements are used to add human-friendly business logging statements. They make it easier to see what the
route is doing.
-->
<route id="log-route">
<from uri="timer:foo?period=1s"/>
<setBody>
<method ref="myBean" method="message"/>
</setBody>
<log message=">>> ${body} : ${id}"/>
</route>
</camelContext>
</blueprint>