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

	<util:properties id="gemfireProperties">
		<prop key="name">GatewayHubNamespaceTest</prop>
		<prop key="mcast-port">0</prop>
		<prop key="log-level">warning</prop>
	</util:properties>

	<gfe:cache properties-ref="gemfireProperties"/>

	<gfe:replicated-region id="Example" persistent="false" enable-gateway="true" hub-id="testGatewayHub"/>

	<gfe:disk-store id="TestGatewayQueueDiskStore" auto-compact="true" allow-force-compaction="true" queue-size="50">
		<gfe:disk-dir location="./gemfire/GatewayHubNamespaceTest/Gateway/Queue"/>
	</gfe:disk-store>

	<bean name="ListenerTwo" class="org.springframework.data.gemfire.config.xml.GatewayHubNamespaceTest.TestGatewayListener" p:name="ListenerTwo"/>

	<gfe:gateway-hub id="TestGatewayHub" bind-address="localhost" manual-start="true" max-connections="125"
					 max-time-between-pings="5000" port="45123" socket-buffer-size="16384" startup-policy="primary">
		<gfe:gateway gateway-id="gateway1" concurrency-level="8" order-policy="thread" socket-buffer-size="65536"
					 socket-read-timeout="75000">
			<gfe:gateway-listener>
				<bean class="org.springframework.data.gemfire.config.xml.GatewayHubNamespaceTest.TestGatewayListener" p:name="ListenerOne"/>
				<ref bean="ListenerTwo"/>
			</gfe:gateway-listener>
			<gfe:gateway-queue alert-threshold="99" enable-batch-conflation="true" batch-size="3" batch-time-interval="10"
							   disk-store-ref="TestGatewayQueueDiskStore" maximum-queue-memory="5" persistent="false"/>
		</gfe:gateway>
		<gfe:gateway gateway-id="gateway2">
			<gfe:gateway-endpoint endpoint-id="endpoint1" host="localhost" port="1234"/>
			<gfe:gateway-endpoint endpoint-id="endpoint2" host="localhost" port="4321"/>
			<gfe:gateway-queue batch-size="6" batch-time-interval="20" enable-batch-conflation="false" persistent="true"/>
		</gfe:gateway>
		<gfe:gateway gateway-id="gateway3">
			<gfe:gateway-listener ref="ListenerTwo"/>
		</gfe:gateway>
	</gfe:gateway-hub>

</beans>
