<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.springframework.org/schema/integration"
		xmlns:xsd="http://www.w3.org/2001/XMLSchema"
		xmlns:beans="http://www.springframework.org/schema/beans"
		xmlns:tool="http://www.springframework.org/schema/tool"
		targetNamespace="http://www.springframework.org/schema/integration"
		elementFormDefault="qualified"
		attributeFormDefault="unqualified">

	<xsd:import namespace="http://www.springframework.org/schema/beans"/>
	<xsd:import namespace="http://www.springframework.org/schema/tool"/>

	<xsd:annotation>
		<xsd:documentation><![CDATA[
	Defines the core configuration elements for Spring Integration.
		]]></xsd:documentation>
	</xsd:annotation>

	<xsd:element name="annotation-config">
		<xsd:annotation>
			<xsd:documentation>
	Enables annotation support for Message Endpoints.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="application-event-multicaster">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines the ApplicationEventMulticaster to use for this ApplicationContext.
	The "task-executor" reference is optional. If not provided, an instance of
	ThreadPoolTaskExecutor will be created by default.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:attribute name="task-executor" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="channel">
		<xsd:annotation>
			<xsd:documentation>
	Defines a Point-to-Point MessageChannel.
			</xsd:documentation>
			<xsd:appinfo>
				<tool:exports type="org.springframework.integration.core.MessageChannel"/>
			</xsd:appinfo>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="channelType">
					<xsd:sequence>
						<xsd:choice minOccurs="0" maxOccurs="1">
							<xsd:element ref="queue"/>
							<xsd:element ref="priority-queue"/>
							<xsd:element ref="rendezvous-queue"/>
						</xsd:choice>
						<xsd:element name="interceptors" type="channelInterceptorsType" minOccurs="0" maxOccurs="1"/>
					</xsd:sequence>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="queue">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines a queue for messages. If 'capacity' is specified, it will be a bounded queue.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:attribute name="capacity" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="priority-queue">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines a queue with priority-ordering for message reception.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:attribute name="capacity" type="xsd:string"/>
			<xsd:attribute name="comparator" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="rendezvous-queue">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines a rendezvous queue where a sender will block until the receiver arrives or vice-versa.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="publish-subscribe-channel">
		<xsd:annotation>
			<xsd:documentation>
	Defines a Publish-Subscribe channel that broadcasts messages to its subscribers.
			</xsd:documentation>
			<xsd:appinfo>
				<tool:exports type="org.springframework.integration.core.MessageChannel"/>
			</xsd:appinfo>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="channelType">
					<xsd:sequence>
						<xsd:element name="interceptors" type="channelInterceptorsType" minOccurs="0" maxOccurs="1"/>
					</xsd:sequence>
					<xsd:attribute name="task-executor" type="xsd:string"/>
					<xsd:attribute name="apply-sequence" type="xsd:string"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="thread-local-channel" type="channelType"/>

	<xsd:complexType name="channelType">
		<xsd:annotation>
			<xsd:documentation>
	Defines a message channel.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:attribute name="id" type="xsd:ID" use="required"/>
		<xsd:attribute name="datatype" type="xsd:string"/>
	</xsd:complexType>

	<xsd:element name="gateway">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines a Messaging Gateway.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:attribute name="id" type="xsd:ID" use="required"/>
			<xsd:attribute name="service-interface" type="xsd:string" use="required"/>
			<xsd:attribute name="default-request-channel" type="xsd:string"/>
			<xsd:attribute name="default-reply-channel" type="xsd:string"/>
			<xsd:attribute name="default-request-timeout" type="xsd:string"/>
			<xsd:attribute name="default-reply-timeout" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="inbound-channel-adapter" type="channelAdapterType">
		<xsd:annotation>
			<xsd:documentation>
	Defines a Channel Adapter that receives from a MessageSource and sends to a MessageChannel.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="outbound-channel-adapter" type="channelAdapterType">
		<xsd:annotation>
			<xsd:documentation>
	Defines a Channel Adapter that receives from a MessageChannel and sends to a MessageConsumer.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:complexType name="channelAdapterType">
		<xsd:sequence>
			<xsd:element ref="poller" minOccurs="0" maxOccurs="1"/>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:ID"/>
		<xsd:attribute name="channel" type="xsd:string"/>
		<xsd:attribute name="ref" type="xsd:string" use="required"/>
		<xsd:attribute name="method" type="xsd:string"/>
		<xsd:attribute name="auto-startup" type="xsd:string" default="true"/>
	</xsd:complexType>

	<xsd:element name="service-activator" type="inputOutputEndpointType">
		<xsd:annotation>
			<xsd:documentation>
	Defines an endpoint for exposing any bean reference as a service that receives
	request Messages from an 'input-channel' and may send reply Messages to an
	'output-channel'. The 'ref' may point to an instance that has either a single
	public method or a method with the @ServiceActivator annotation. Otherwise, the
	'method' attribute should be provided along with 'ref'.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:complexType name="inputOutputEndpointType">
		<xsd:annotation>
			<xsd:documentation>
	Base type for Message Endpoint elements that accept Messages from an input-channel
	and also may produce reply Messages to be sent to an output-channel.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="inputEndpointType">
				<xsd:attribute name="output-channel" type="xsd:string">
					<xsd:annotation>
						<xsd:appinfo>
							<tool:annotation kind="ref">
								<tool:expected-type type="org.springframework.integration.core.MessageChannel"/>
							</tool:annotation>
						</xsd:appinfo>
					</xsd:annotation>
				</xsd:attribute>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:complexType name="inputEndpointType">
		<xsd:annotation>
			<xsd:documentation>
	Base type for Message Endpoint elements that accept Messages from an input-channel.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexContent>
			<xsd:extension base="beans:identifiedType">
				<xsd:all>
					<xsd:element ref="poller" minOccurs="0" maxOccurs="1"/>
				</xsd:all>
				<xsd:attribute name="input-channel" type="xsd:string">
					<xsd:annotation>
						<xsd:appinfo>
							<tool:annotation kind="ref">
								<tool:expected-type type="org.springframework.integration.core.MessageChannel"/>
							</tool:annotation>
						</xsd:appinfo>
					</xsd:annotation>
				</xsd:attribute>
				<xsd:attribute name="ref" type="xsd:string"/>
				<xsd:attribute name="method" type="xsd:string"/>
				<xsd:attribute name="selector" type="xsd:string"/>
				<xsd:attribute name="auto-startup" type="xsd:string"/>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>

	<xsd:element name="poller">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines a poller.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:sequence>
				<xsd:choice minOccurs="1" maxOccurs="1">
					<xsd:element ref="interval-trigger"/>
					<xsd:element ref="cron-trigger"/>
				</xsd:choice>
				<xsd:element name="transactional" type="transactionalType" minOccurs="0" maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attribute name="receive-timeout" type="xsd:string"/>
			<xsd:attribute name="send-timeout" type="xsd:string"/>
			<xsd:attribute name="max-messages-per-poll" type="xsd:string"/>
			<xsd:attribute name="task-executor" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="interval-trigger">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines an interval-based trigger.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:attribute name="interval" type="xsd:string"/>
			<xsd:attribute name="initial-delay" type="xsd:string"/>
			<xsd:attribute name="fixed-rate" type="xsd:string" default="false"/>
			<xsd:attribute name="time-unit" default="MILLISECONDS">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
	The java.util.concurrent.TimeUnit enum value. The interval trigger resolution
	only has millisecond granularity, so we only provide MILLISECONDS and SECONDS.
	For hourly, daily, and monthly settings, consider using a cron-trigger instead.
					]]></xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:restriction base="xsd:string">
						<xsd:enumeration value="MILLISECONDS"/>
						<xsd:enumeration value="SECONDS"/>
					</xsd:restriction>
				</xsd:simpleType>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="cron-trigger">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines an cron-based trigger.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:attribute name="expression" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="selector-chain">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines a MessageSelector chain.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:choice minOccurs="0" maxOccurs="unbounded">
				<xsd:element ref="selector"/>
				<xsd:element ref="selector-chain"/>
			</xsd:choice>
			<xsd:attribute name="id" type="xsd:ID"/>
			<xsd:attribute name="voting-strategy" default="ALL">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
	Enumeration with values that match the MessageSelectorChain.VotingStrategy enum.
					]]></xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value="ALL"/>
					<xsd:enumeration value="ANY"/>
					<xsd:enumeration value="MAJORITY"/>
					<xsd:enumeration value="MAJORITY_OR_TIE"/>
				</xsd:restriction>
			</xsd:simpleType>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="selector">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Provides a MessageSelector reference.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:attribute name="ref" type="xsd:string" use="required"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="thread-pool-task-executor">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines a ThreadPoolTaskExecutor.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:attribute name="id" type="xsd:ID" use="required"/>
			<xsd:attribute name="core-size" type="xsd:string" default="1"/>
			<xsd:attribute name="max-size" type="xsd:string" default="10"/>
			<xsd:attribute name="queue-capacity" type="xsd:string" default="0"/>
			<xsd:attribute name="keep-alive-seconds" type="xsd:string" default="60"/>
			<xsd:attribute name="rejection-policy" default="CALLER_RUNS">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
	The RejectedExecutionHandler type.
					]]></xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value="ABORT"/>
					<xsd:enumeration value="CALLER_RUNS"/>
					<xsd:enumeration value="DISCARD"/>
					<xsd:enumeration value="DISCARD_OLDEST"/>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="transformer" type="inputOutputEndpointType">
		<xsd:annotation>
			<xsd:documentation>
	Defines a Transformer.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="filter" type="inputOutputEndpointType">
		<xsd:annotation>
			<xsd:documentation>
	Defines a Filter.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="router">
		<xsd:annotation>
			<xsd:documentation>
	Defines a Router.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:complexContent>
				<xsd:extension base="inputEndpointType">
					<xsd:attribute name="default-output-channel" type="xsd:string"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="splitter" type="inputOutputEndpointType">
		<xsd:annotation>
			<xsd:documentation>
	Defines a Splitter.
			</xsd:documentation>
		</xsd:annotation>
	</xsd:element>

	<xsd:element name="aggregator">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines an aggregating message endpoint.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:complexContent>
				<xsd:extension base="inputOutputEndpointType">
					<xsd:attribute name="completion-strategy" type="xsd:string"/>
					<xsd:attribute name="completion-strategy-method" type="xsd:string"/>
					<xsd:attribute name="discard-channel" type="xsd:string"/>
					<xsd:attribute name="send-timeout" type="xsd:string"/>
					<xsd:attribute name="send-partial-result-on-timeout" type="xsd:string"/>
					<xsd:attribute name="tracked-correlation-id-capacity" type="xsd:string"/>
					<xsd:attribute name="reaper-interval" type="xsd:string"/>
					<xsd:attribute name="timeout" type="xsd:string"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="resequencer">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines a resequencing message endpoint.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:complexContent>
				<xsd:extension base="inputOutputEndpointType">
					<xsd:attribute name="discard-channel" type="xsd:string"/>
					<xsd:attribute name="send-timeout" type="xsd:string"/>
					<xsd:attribute name="release-partial-sequences" type="xsd:string"/>
					<xsd:attribute name="send-partial-result-on-timeout"  type="xsd:string"/>
					<xsd:attribute name="tracked-correlation-id-capacity" type="xsd:string"/>
					<xsd:attribute name="reaper-interval" type="xsd:string"/>
					<xsd:attribute name="timeout" type="xsd:string"/>
				</xsd:extension>
			</xsd:complexContent>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="completion-strategy">
		<xsd:complexType>
			<xsd:annotation>
				<xsd:documentation>
	Defines a completion strategy.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:attribute name="ref" type="xsd:string" use="required"/>
			<xsd:attribute name="method" type="xsd:string"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="channelInterceptorsType">
		<xsd:annotation>
			<xsd:documentation>
	Defines a list of interceptors. Each element may be a ChannelInterceptor, ref, or inner-bean.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:sequence>
			<xsd:choice minOccurs="0" maxOccurs="unbounded">
				<xsd:element name="ref" minOccurs="0" maxOccurs="unbounded">
					<xsd:complexType>
						<xsd:attribute name="bean" use="required"/>
					</xsd:complexType>
				</xsd:element>
				<xsd:element name="wire-tap" type="wireTapType" minOccurs="0" maxOccurs="unbounded"/>
				<xsd:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
			</xsd:choice>
		</xsd:sequence>
	</xsd:complexType>

	<xsd:complexType name="wireTapType">
		<xsd:annotation>
			<xsd:documentation>
	Defines a Wire Tap Channel Interceptor.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:attribute name="channel" type="xsd:string" use="required"/>
		<xsd:attribute name="selector" type="xsd:string"/>
		<xsd:attribute name="timeout" type="xsd:string"/>
	</xsd:complexType>

	<xsd:complexType name="transactionalType">
		<xsd:attribute name="transaction-manager" type="xsd:string" default="transactionManager">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
	The bean name of the PlatformTransactionManager to use.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="propagation" default="REQUIRED">
			<xsd:annotation>
				<xsd:documentation source="java:org.springframework.transaction.annotation.Propagation"><![CDATA[
	The transaction propagation behavior.
				]]></xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value="REQUIRED"/>
					<xsd:enumeration value="SUPPORTS"/>
					<xsd:enumeration value="MANDATORY"/>
					<xsd:enumeration value="REQUIRES_NEW"/>
					<xsd:enumeration value="NOT_SUPPORTED"/>
					<xsd:enumeration value="NEVER"/>
					<xsd:enumeration value="NESTED"/>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="isolation" default="DEFAULT">
			<xsd:annotation>
				<xsd:documentation source="java:org.springframework.transaction.annotation.Isolation"><![CDATA[
	The transaction isolation level.
				]]></xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:restriction base="xsd:string">
					<xsd:enumeration value="DEFAULT"/>
					<xsd:enumeration value="READ_UNCOMMITTED"/>
					<xsd:enumeration value="READ_COMMITTED"/>
					<xsd:enumeration value="REPEATABLE_READ"/>
					<xsd:enumeration value="SERIALIZABLE"/>
				</xsd:restriction>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="timeout" type="xsd:string" default="-1">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
	The transaction timeout value (in seconds).
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="read-only" type="xsd:string" default="false">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
	Is this transaction read-only?
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>

</xsd:schema>