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

Allow configurable hostname lookup #934

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

jtomson
Copy link

@jtomson jtomson commented May 26, 2022

Please make sure that the following boxes are checked before submitting your Pull Request, thank you!

  • This change is against the develop branch, not master.
  • You have signed the Eclipse ECA
  • All of your commits have been signed-off with the correct email address (the same one that you
    used to sign the CLA) Hint: use the -s argument when committing.
  • If This PR fixes an issue, that you reference the issue below. OR if this is a new issue that
    you are fixing straight away that you add some Description about the bug and how this will fix it.
  • If this is new functionality, You have added the appropriate Unit tests.

We are using this interface to perform IPv4-only lookups. It may also help those looking for other hostname resolution behavior like #475

If there's interest in merging this I am happy to add javadocs as well as clientv5 modifications

@jtomson jtomson force-pushed the pluggable_resolver branch 4 times, most recently from 908739f to f6681ea Compare May 27, 2022 00:44
Copy link
Author

@jtomson jtomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please ignore the force push noise

@@ -69,7 +73,13 @@ public void start() throws IOException, MqttException {
try {
// @TRACE 252=connect to host {0} port {1} timeout {2}
log.fine(CLASS_NAME,methodName, "252", new Object[] {host, Integer.valueOf(port), Long.valueOf(conTimeout*1000)});
SocketAddress sockaddr = new InetSocketAddress(host, port);
final SocketAddress sockaddr;
if (dns != null) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only behavior added. The rest of the changes in this PR are plumbing this optional dns interface from the user to this point

@jtomson
Copy link
Author

jtomson commented Mar 21, 2023

@rdasgupt is there any appetite for this change? if so I'd be happy to resolve the conflicts thanks

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

Successfully merging this pull request may close these issues.

1 participant