spring-integration
spring-integration copied to clipboard
There is no explanation about how to use NIO for UDP
In what version(s) of Spring Integration are you seeing this issue?
6.1.1
Describe the bug
There is no explanation in documentation about how to use NIO for UDP neither corresponding methods or attributes in API.
To Reproduce
Look here: https://docs.spring.io/spring-integration/reference/html/ip.html#ip
Expected behavior
There should be explanation how to use NIO for UDP or clear explatation why it's impossible.
Sample
There is no examles of using UDP adapters with NIO.
There is currently no support for NIO with UDP in this project.
It would only make sense to implement it if a single inbound adapter could support reading from multiple sockets, which is currently not the case. It would require an architectural change.
See https://stackoverflow.com/questions/16048284/whats-the-point-of-using-udp-with-nio for a discussion about this.
Contributions are welcome.
It would only make sense to implement it if a single inbound adapter could support reading from multiple sockets, which is currently not the case. It would require an architectural change.
I think it would also make sense to implement it even if there is multiple inbound adapters with single socket in each but they all share same EventLoopGroup (e. g. for Netty), which is quite normal. What do you think?
Right, but that's still an architectural change, to externalize the event handling to a shared component.
May be we just need to look into a new pair of channel adapters based on Reactor Netty:
https://projectreactor.io/docs/netty/release/reference/index.html#udp-server https://projectreactor.io/docs/netty/release/reference/index.html#udp-client ?
May be we just need to look into a new pair of channel adapters based on Reactor Netty:
https://projectreactor.io/docs/netty/release/reference/index.html#udp-server https://projectreactor.io/docs/netty/release/reference/index.html#udp-client ?
It's what I use now instead of UDP integration adapters.
I would suggest to repurpose this issue into something like new spring-integration-netty module.
And there we would look into a UDP part how to implement it based on the Netty library.
Or something what is on top of that, like Reactor Netty: https://projectreactor.io/docs/netty/milestone/reference/about-doc.html