Skip to content

Conversation

vcostet
Copy link

@vcostet vcostet commented Aug 22, 2025

Similarly to what's done on the java client (here), add a way to resolve addresses using a function, instead of a static value.

var streamSystem = await StreamSystem.Create(
    new StreamSystemConfig()
    {
        UserName = "myuser",
        Password = "mypassword",
        AddressResolver = new AddressResolverDynamic((host, port) => {
            // Is called after getting the stream leader/replica host
            // and port, and before trying to connect to them
            return new IPEndPoint(IPAddress.Parse("xxx.xxx.xxx.xxx"));
        }),
        Endpoints = new List<EndPoint> {endpoint1}
    }
);

AddressResolver attribute on StreamSystemConfig has been changed to an interface, so the existing AddressResolver class can still be used.

@Gsantomaggio
Copy link
Member

Thank you, @vcostet. Can you please check the CI errors?

@vcostet
Copy link
Author

vcostet commented Aug 25, 2025

Should be good, at least for the build part. I put back the Endpoint attribute to public on AddressResolver.

@Zerpet
Copy link
Member

Zerpet commented Aug 27, 2025

Hi @vcostet 👋 Thank you for contributing to this client. Recently (a month ago) our company did some changes around open source contribution, and now it's required that you sign a contributor license agreement (CLA) before we can accept your PR.

The process is explained here in this repo README: https://github.com/rabbitmq/cla

Would you review and sign this CLA?

Copy link
Member

@Zerpet Zerpet left a comment

Choose a reason for hiding this comment

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

Blocking merge on CLA signing. Code looks good.

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.

3 participants