<?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-ip="http://www.springframework.org/schema/integration/ip"
	   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/ip https://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd">

	<int-ip:udp-inbound-channel-adapter id="inbound" port="0" channel="in" />

	<int:channel id="in" />

	<int:transformer expression="new String(payload).toUpperCase()" input-channel="in" output-channel="out"/>

	<int:channel id="out" />

	<int-ip:udp-outbound-channel-adapter socket-expression="@inbound.socket"
										 destination-expression="'udp://localhost:' + headers['ip_packetAddress'].port"
										 channel="out" />

</beans>
