Oct 29th, 2010, 09:30 AM
upd-inbound-channel-adapter missing source port in header
I've got a use case where i've got a udp packet coming and i want to send a response back to that same address/port
I was hoping to use an udp-outbound-channel-adapter to handle this. I dug into the code for UnicastReceivingChannelAdapter and the DatagramPacketMessageMapper and saw that the ip address is put into the header, but the port isn't.
I was hoping to just extend the DatagramPacketMessageMapper and then wire it up to the UnicastReceivingChannelAdapter but there doesn't appear to be an easy way of doing that (no setter on UnicastReceivingChannelAdapter)
Short of creating a ServiceAdapter and writing the code to catch the UDP messages myself, is there a spring integration way of doing this?
Oct 29th, 2010, 10:40 AM
I presume the client (sender) is not an SI component because this would need a gateway on the client side and we don't currently have udp gateways, just channel adapters.
Also, since dynamic addressing in not supported on spring integration outbound adapters, I presume you plan to roll your own udp code to send the response.
So, you will have to do that side of the communication, and I think you are stuck with doing the receiving side too, at least in the short term.
I think the proper way for SI to support this functionality would be via an inbound udp gateway; I never felt there was a need for these, particularly on the outbound side, but I think you may have made a case for a gateway on the inbound side (and we'd probably just do both for symmetry).
Feel free to enter a New Feature JIRA here https://jira.springsource.org/browse/INT