<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:gfe="http://www.springframework.org/schema/geode"
	xmlns:int="http://www.springframework.org/schema/integration"
	xmlns:util="http://www.springframework.org/schema/util"
	xmlns:int-gfe="http://www.springframework.org/schema/integration/gemfire"
	xmlns:context="http://www.springframework.org/schema/context"
	xsi:schemaLocation="http://www.springframework.org/schema/integration/gemfire https://www.springframework.org/schema/integration/gemfire/spring-integration-gemfire.xsd
		http://www.springframework.org/schema/geode https://www.springframework.org/schema/geode/spring-geode.xsd
		http://www.springframework.org/schema/integration https://www.springframework.org/schema/integration/spring-integration.xsd
		http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd
		http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd
		http://www.springframework.org/schema/context https://www.springframework.org/schema/context/spring-context.xsd">

	<context:property-placeholder properties-ref="props" />

	<util:properties id="props">
		<prop key="durable">true</prop>
	</util:properties>

	<gfe:client-cache use-bean-factory-locator="false"
		id="client-cache" pool-name="client-pool" />

	<gfe:pool id="client-pool" subscription-enabled="true">
		<gfe:server host="localhost" port="40404" />
	</gfe:pool>

	<gfe:client-region id="test" cache-ref="client-cache"
		pool-name="client-pool" data-policy="EMPTY" />

	<gfe:cq-listener-container id="queryListenerContainer"
		cache="client-cache" pool-name="client-pool"/>

	<int-gfe:cq-inbound-channel-adapter id="withDurable"
		cq-listener-container="queryListenerContainer" query="select * from /test"
		channel="outputChannel1" durable="${durable}" />

	<int:channel id="outputChannel1">
		<int:queue />
	</int:channel>

	<int-gfe:cq-inbound-channel-adapter
		cq-listener-container="queryListenerContainer" query="select * from /test"
		channel="outputChannel2" expression="newValue" query-events="CREATED" />

	<int:channel id="outputChannel2">
		<int:queue />
	</int:channel>

</beans>
