
OSGI-INF.blueprint.fabric-camel-demo.xml Maven / Gradle / Ivy
The newest version!
<!-- Copyright (C) FuseSource, Inc. http://fusesource.com Licensed 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="org.fusesource.fabric.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:org.fusesource.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 --> <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