Skip to content

Remove random and least-leaders leader locator strategy #732

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

Merged
merged 1 commit into from
Mar 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions src/main/java/com/rabbitmq/stream/StreamCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,23 +146,7 @@ enum LeaderLocator {
*
* <p>Default value for RabbitMQ 3.10+.
*/
BALANCED("balanced"),

/**
* The stream leader will be a random node of the cluster.
*
* <p>Deprecated as of RabbitMQ 3.10, same as {@link LeaderLocator#BALANCED}.
*/
RANDOM("random"),

/**
* The stream leader will be on the node with the least number of stream leaders.
*
* <p>Deprecated as of RabbitMQ 3.10, same as {@link LeaderLocator#BALANCED}.
*
* <p>Default value for RabbitMQ 3.9.
*/
LEAST_LEADERS("least-leaders");
BALANCED("balanced");

String value;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class StreamStreamCreator implements StreamCreator {

private final StreamEnvironment environment;
private final Client.StreamParametersBuilder streamParametersBuilder =
new Client.StreamParametersBuilder().leaderLocator(LeaderLocator.LEAST_LEADERS);
new Client.StreamParametersBuilder().leaderLocator(LeaderLocator.BALANCED);
private String name;
private DefaultSuperStreamConfiguration superStreamConfiguration;

Expand Down
Loading