Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no explanation about how to use NIO for UDP #8656

Open
clayly opened this issue Jun 25, 2023 · 5 comments
Open

There is no explanation about how to use NIO for UDP #8656

clayly opened this issue Jun 25, 2023 · 5 comments

Comments

@clayly
Copy link

clayly commented Jun 25, 2023

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.

@clayly clayly added status: waiting-for-triage The issue need to be evaluated and its future decided type: bug labels Jun 25, 2023
@garyrussell garyrussell added type: enhancement and removed type: bug status: waiting-for-triage The issue need to be evaluated and its future decided labels Jun 25, 2023
@garyrussell
Copy link
Contributor

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.

@garyrussell garyrussell added this to the Backlog milestone Jun 25, 2023
@clayly
Copy link
Author

clayly commented Jun 25, 2023

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?

@garyrussell
Copy link
Contributor

Right, but that's still an architectural change, to externalize the event handling to a shared component.

@artembilan
Copy link
Member

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
?

@clayly
Copy link
Author

clayly commented Jun 26, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants