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

Forcing connection over IPv6 or IPv4 #226

Closed
pantonis opened this issue Jul 28, 2016 · 2 comments
Closed

Forcing connection over IPv6 or IPv4 #226

pantonis opened this issue Jul 28, 2016 · 2 comments
Assignees

Comments

@pantonis
Copy link

Hi,

I have come across the scenario that the library throws a SocketException in SocketFrameHandler constructor when it tries to connect through IPV6. It the successfully connects using IPv4.

This is not a problem most of the times but for low latency systems when memory is important is kind of expensive to throw exception every time a connection is being established, especially when there are a number of connections.

Is it possible to somehow pass the socket address type as parameter to avoid this?

Thanks

@michaelklishin
Copy link
Member

Can you please provide an example code snippet, library and OS version details?

RabbitMQ connections are supposed to be long lived so I am not buying into the argument that throwing and catching an exception is expensive. If it is then you should be using a memory managed runtime to begin with.

That said, forcing IPv6 or IPv4 is a fairly reasonable request.

@michaelklishin michaelklishin changed the title Socket.OSSupportsIPv6 Forcing connection over IPv6 or IPv4 Jul 28, 2016
@pantonis
Copy link
Author

pantonis commented Jul 28, 2016

I am currently running on Windows 10 and windows server 2012 r2.
"RabbitMQ connections are supposed to be long lived" I know that. I was speaking about scenarios that connectivitity is lost due to network problems. Unfortunately in a low latency system I don't have the flexibility to throw exceptions.

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

No branches or pull requests

3 participants