Skip to content

Streams: advertise localhost to local clients #9425

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

Closed
wants to merge 1 commit into from

Conversation

michaelklishin
Copy link
Collaborator

Note that there is a way to opt out just in case.

Closes #9424.

Note that there is a way to opt out just in case.

Closes #9424.
@acogoluegnes
Copy link
Contributor

This is not working as expected, as the changes apply only to the hostname and port information carried out by the client connection, not where the information is actually advertised (which is in the metadata command).

We would need to make the same check and skip the remote calls to always return the information from the local node. This assumes there's only one node in the cluster.

With the current changes, the broker returns the hostname, e.g. foobar, the client connects to foobar, the connection information contains localhost, this is not what the client expects, so it closes the connection, and retries. Infinite loop.

@michaelklishin michaelklishin changed the title Streams: advertise localhost to local clients WIP Streams: advertise localhost to local clients Sep 14, 2023
@michaelklishin
Copy link
Collaborator Author

Instead of updating this PR to make the same change in two places we decided to try a client library solution. The downside of that is that we have to do it N times but the consensus on the team seems to be tilted that way.

@michaelklishin michaelklishin changed the title WIP Streams: advertise localhost to local clients Streams: advertise localhost to local clients Sep 14, 2023
@michaelklishin
Copy link
Collaborator Author

rabbitmq/rabbitmq-stream-java-client#420 is the first client library change that accomplishes the same goal.

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

Successfully merging this pull request may close these issues.

Streams: consider advertising localhost as connection hostname for clients that originally connect via localhost
2 participants