Skip to content

Commit

Permalink
revert away from using client load balancing.
Browse files Browse the repository at this point in the history
This breaks the client auto-subscribe.

See gh-8
  • Loading branch information
spencergibb committed Nov 29, 2021
1 parent fdfb81b commit ea6a878
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,10 @@ public BrokerRSocketRequester brokerClientRSocketRequester(BrokerRSocketRequeste
.orElseThrow(() -> new IllegalStateException("Unknown transport " + properties));

// TODO: targets and strategy as beans
Flux<List<LoadbalanceTarget>> loadbalanceTargets = Flux.just(Collections.singletonList(LoadbalanceTarget.from("config", clientTransport)));
RoundRobinLoadbalanceStrategy loadbalanceStrategy = new RoundRobinLoadbalanceStrategy();
BrokerRSocketRequester requester = builder.transports(loadbalanceTargets, loadbalanceStrategy);
//Flux<List<LoadbalanceTarget>> loadbalanceTargets = Flux.just(Collections.singletonList(LoadbalanceTarget.from("config", clientTransport)));
//RoundRobinLoadbalanceStrategy loadbalanceStrategy = new RoundRobinLoadbalanceStrategy();
//BrokerRSocketRequester requester = builder.transports(loadbalanceTargets, loadbalanceStrategy);
BrokerRSocketRequester requester = builder.transport(clientTransport);

// if we don't subscribe, there won't be a connection to the broker.
requester.rsocketClient().source().subscribe();
Expand Down

0 comments on commit ea6a878

Please sign in to comment.