All Downloads are FREE. Search and download functionalities are using the official Maven repository.

t.commons.components.soitoolkit-commons-mule.2.0.0-M4.source-code.soitoolkit-mule-jms-connector-activemq-external.xml Maven / Gradle / Ivy

There is a newer version: 2.0.0-M6
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the soi-toolkit project under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The soi-toolkit project 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.
-->
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:spring="http://www.springframework.org/schema/beans"
	xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
	xsi:schemaLocation="
		http://www.springframework.org/schema/beans    http://www.springframework.org/schema/beans/spring-beans-current.xsd
		http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd 
		http://www.mulesoft.org/schema/mule/jms  http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd">

	<spring:beans>
		<spring:import resource="classpath:soitoolkit-mule-jms-connector-commons.xml" />
		
		<spring:bean name="soitoolkit-jms-redelivery-policy" class="org.apache.activemq.RedeliveryPolicy">
            <spring:property name="maximumRedeliveries" value="${SOITOOLKIT_MULE_AMQ_MAX_REDELIVERIES}" />
            <spring:property name="initialRedeliveryDelay" value="${SOITOOLKIT_MULE_AMQ_REDELIVERY_DELAY}" />	
     	</spring:bean>	
		
		<spring:bean name="soitoolkit-jms-noredelivery-policy" class="org.apache.activemq.RedeliveryPolicy">
            <spring:property name="maximumRedeliveries" value="0" />
     	</spring:bean>
		
		<!--
	    Sample configuration settings:
	    
	    SOITOOLKIT_MULE_AMQ_BROKER_URL=failover:(tcp://host1:61616,tcp://host2:61616)
		SOITOOLKIT_MULE_AMQ_MAX_REDELIVERIES=10
		SOITOOLKIT_MULE_AMQ_REDELIVERY_DELAY=60000
		SOITOOLKIT_MULE_AMQ_NO_OF_CONSUMERS=2
		-->
		<spring:bean name="soitoolkit-jms-connection-factory"
			class="org.apache.activemq.ActiveMQConnectionFactory">
	        <spring:property name="brokerURL" value="${SOITOOLKIT_MULE_AMQ_BROKER_URL}" />
			<spring:property name="redeliveryPolicy" ref="soitoolkit-jms-redelivery-policy" />
		</spring:bean>
		
		<spring:bean name="soitoolkit-jms-noredelivery-connection-factory"
			class="org.apache.activemq.ActiveMQConnectionFactory">
				<spring:property name="brokerURL" value="${SOITOOLKIT_MULE_AMQ_BROKER_URL}" />
				<spring:property name="redeliveryPolicy" ref="soitoolkit-jms-noredelivery-policy">
			</spring:property>
		</spring:bean>
	</spring:beans>

	<jms:connector name="soitoolkit-jms-connector"
		connectionFactory-ref="soitoolkit-jms-connection-factory"
		disableTemporaryReplyToDestinations="true" 
		persistentDelivery="true"
		numberOfConsumers="${SOITOOLKIT_MULE_AMQ_NO_OF_CONSUMERS}"
		specification="1.1"
		maxRedelivery="-1">
		<service-overrides sessionHandler="org.mule.session.NullSessionHandler" />
	</jms:connector>
		
	<jms:connector name="soitoolkit-jms-noredelivery-connector"
		connectionFactory-ref="soitoolkit-jms-noredelivery-connection-factory"
		disableTemporaryReplyToDestinations="true" 
		persistentDelivery="true"
		numberOfConsumers="${SOITOOLKIT_MULE_AMQ_NO_OF_CONSUMERS}"
		specification="1.1"
		maxRedelivery="-1">
 		<service-overrides sessionHandler="org.mule.session.NullSessionHandler" />
	</jms:connector>	
</mule>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy