<?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:int="http://www.springframework.org/schema/integration"
	   xmlns:int-hazelcast="http://www.springframework.org/schema/integration/hazelcast"
	   xsi:schemaLocation="http://www.springframework.org/schema/beans
    https://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/integration
    https://www.springframework.org/schema/integration/spring-integration.xsd
    http://www.springframework.org/schema/integration/hazelcast
	https://www.springframework.org/schema/integration/hazelcast/spring-integration-hazelcast.xsd">

	<int:channel id="cmChannel1">
		<int:queue/>
	</int:channel>
	
	<int:channel id="cmChannel2">
		<int:queue/>
	</int:channel>
 	
	<int:channel id="cmChannel3">
		<int:queue/>
	</int:channel>

	<int:channel id="cmChannel4">
		<int:queue/>
	</int:channel>
	
	<int:channel id="cmChannel5">
		<int:queue/>
	</int:channel>
 	
	<int:channel id="cmChannel6">
		<int:queue/>
	</int:channel>

	<int-hazelcast:cm-inbound-channel-adapter 
				 channel="cmChannel1" 
				 hazelcast-instance="hazelcastInstance" 
				 monitor-types="MEMBERSHIP" />
				 
	<int-hazelcast:cm-inbound-channel-adapter 
				 channel="cmChannel2" 
				 hazelcast-instance="hazelcastInstance" 
				 monitor-types="DISTRIBUTED_OBJECT" /> 
 				 
	<int-hazelcast:cm-inbound-channel-adapter 
				 channel="cmChannel3" 
				 hazelcast-instance="hazelcastInstance" 
				 monitor-types="MIGRATION" /> 
				 
	<int-hazelcast:cm-inbound-channel-adapter 
				 channel="cmChannel4" 
				 hazelcast-instance="hazelcastInstance2" 
				 monitor-types="LIFECYCLE" />
				 
	<int-hazelcast:cm-inbound-channel-adapter 
				 channel="cmChannel5" 
				 hazelcast-instance="hazelcastInstance" 
				 monitor-types="CLIENT" />
 			 
	<int-hazelcast:cm-inbound-channel-adapter 
				 channel="cmChannel6" 
				 hazelcast-instance="hazelcastInstance" 
				 monitor-types="MEMBERSHIP,DISTRIBUTED_OBJECT" />
	
	<bean id="hazelcastInstance" class="com.hazelcast.core.Hazelcast" factory-method="newHazelcastInstance"
		  destroy-method="shutdown">
		<constructor-arg>
	        <bean class="com.hazelcast.config.Config">
	            <property name="groupConfig">
	                <bean class="com.hazelcast.config.GroupConfig">
	                    <property name="name" value="Test_Group_Name1"/>
	                    <property name="password" value="dev-pass"/>
	                </bean>
	            </property>
	            <property name="networkConfig">
					<bean class="com.hazelcast.config.NetworkConfig">
						<property name="port" value="5701"/>
						<property name="portAutoIncrement" value="false"/>
						<property name="join">
							<bean class="com.hazelcast.config.JoinConfig">
								<property name="multicastConfig">
									<bean class="com.hazelcast.config.MulticastConfig">
										<property name="enabled" value="false" />
									</bean>
								</property>
								<property name="tcpIpConfig">
									<bean class="com.hazelcast.config.TcpIpConfig">
										<property name="members" value="127.0.0.1:5701,127.0.0.1:5703" />
										<property name="enabled" value="true" />
									</bean>
								</property>
							</bean>
						</property>
					</bean>
				</property>
	        </bean>
	    </constructor-arg>
	</bean>
	
	<bean id="hazelcastInstance2" class="com.hazelcast.core.Hazelcast" factory-method="newHazelcastInstance"
		  destroy-method="shutdown">
		<constructor-arg>
	        <bean class="com.hazelcast.config.Config">
	            <property name="groupConfig">
	                <bean class="com.hazelcast.config.GroupConfig">
	                    <property name="name" value="Test_Group_Name2"/>
	                </bean>
	            </property>
	            <property name="networkConfig">
					<bean class="com.hazelcast.config.NetworkConfig">
						<property name="port" value="5702"/>
						<property name="portAutoIncrement" value="false"/>
						<property name="join">
							<bean class="com.hazelcast.config.JoinConfig">
								<property name="multicastConfig">
									<bean class="com.hazelcast.config.MulticastConfig">
										<property name="enabled" value="false" />
									</bean>
								</property>
								<property name="tcpIpConfig">
									<bean class="com.hazelcast.config.TcpIpConfig">
										<property name="members" value="127.0.0.1:5702" />
										<property name="enabled" value="true" />
									</bean>
								</property>
							</bean>
						</property>
					</bean>
				</property>
	        </bean>
	    </constructor-arg>
	</bean>
	
	<bean id="hazelcastInstance3" class="com.hazelcast.core.Hazelcast" factory-method="newHazelcastInstance"
		  destroy-method="shutdown">
		<constructor-arg>
	        <bean class="com.hazelcast.config.Config">
	            <property name="groupConfig">
	                <bean class="com.hazelcast.config.GroupConfig">
	                    <property name="name" value="Test_Group_Name1"/>
	                    <property name="password" value="dev-pass"/>
	                </bean>
	            </property>
	            <property name="networkConfig">
					<bean class="com.hazelcast.config.NetworkConfig">
						<property name="port" value="5703"/>
						<property name="portAutoIncrement" value="false"/>
						<property name="join">
							<bean class="com.hazelcast.config.JoinConfig">
								<property name="multicastConfig">
									<bean class="com.hazelcast.config.MulticastConfig">
										<property name="enabled" value="false" />
									</bean>
								</property>
								<property name="tcpIpConfig">
									<bean class="com.hazelcast.config.TcpIpConfig">
										<property name="members" value="127.0.0.1:5701,127.0.0.1:5703" />
										<property name="enabled" value="true" />
									</bean>
								</property>
							</bean>
						</property>
 					</bean>
				</property>
	        </bean>
	    </constructor-arg>
	</bean>
</beans>
