
OSGI-INF.blueprint.fabric-camel-demo.xml Maven / Gradle / Ivy
The newest version!
<!-- Copyright 2005-2015 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. --> <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0" xsi:schemaLocation=" http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"> <cm:property-placeholder id="placeholder" persistent-id="io.fabric8.example.camel" update-strategy="reload"> <cm:default-properties> <cm:property name="username" value="admin"/> <cm:property name="password" value="admin"/> </cm:default-properties> </cm:property-placeholder> <camelContext id="fabric-camel-demo" xmlns="http://camel.apache.org/schema/blueprint"> <route id="route1"> <from uri="timer://foo?period=5s"/> <setBody> <simple>Fabric Camel Example: ${date:now:hh:MM:ss.SSS})</simple> </setBody> <to uri="activemq:queue:camel-test"/> </route> <route id="route2"> <from uri="activemq:queue:camel-test"/> <to uri="log:io.fabric?level=INFO&showExchangePattern=false&showBodyType=false"/> </route> </camelContext> <!-- use the fabric protocol in the brokerURL to connect to the ActiveMQ broker registered as default name --> <!-- notice we could have used amq as the component name in Camel, and avoid any configuration at all, as the amq component is provided out of the box when running in fabric --> <bean id="jmsConnectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value="discovery:(fabric:default)"/> <property name="userName" value="${username}"/> <property name="password" value="${password}"/> </bean> <bean id="pooledConnectionFactory" class="org.apache.activemq.pool.PooledConnectionFactory"> <property name="maxConnections" value="1"/> <property name="maximumActiveSessionPerConnection" value="500"/> <property name="connectionFactory" ref="jmsConnectionFactory"/> </bean> <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent"> <property name="connectionFactory" ref="pooledConnectionFactory"/> </bean> </blueprint>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy