rabbitmq / rabbitmq-stream-rust-client

A client library for RabbitMQ streams
Other
152 stars 14 forks source link

Add Client Workaround With a Load Balancer #219

Closed JiaYingZhang closed 1 month ago

JiaYingZhang commented 1 month ago

This PR add client workaound with a load balancer.

Client Workaround With a Load Balancer

The implementation method is similar to adding the load_malancer_mode option to the Python rstream client.

Gsantomaggio commented 1 month ago

Hi @JiaYingZhang May I ask why did you close the PR?

JiaYingZhang commented 1 month ago

@Gsantomaggio Because the producer must connect to the leader node with a load balancer, and my previous PR did not implement it.

A client application can still always connect to the load balancer and end up connected to the appropriate node. How can it do it? Two steps:

use the metadata command but ignore the information and always connect to the load balancer
retry connecting until it gets connected to the appropriate node

I will submit a new PR right away if it is still needed.

Gsantomaggio commented 1 month ago

yes, please. We don't have space to follow this client, but it is on our plan to restart working on it. Any external contribution is welcome. Thank you