Skip to content

Commit 667c746

Browse files
steveguryNiteshKant
authored andcommitted
Disable Backup-Request / Retries. (#102)
* Disable Backup-Request / Retries. **Problem** There are bugs related to Backup-Request/Retries subscription. The remaining part of the code is ok. **Solution** Disable the code in the ClientBuilder. * Address comments
1 parent 023bb54 commit 667c746

File tree

1 file changed

+1
-34
lines changed

1 file changed

+1
-34
lines changed

reactivesocket-client/src/main/java/io/reactivesocket/client/ClientBuilder.java

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,6 @@ public ClientBuilder withConnectTimeout(long timeout, TimeUnit unit) {
103103
);
104104
}
105105

106-
public ClientBuilder withBackupRequest(double quantile) {
107-
return new ClientBuilder(
108-
name,
109-
executor,
110-
requestTimeout, requestTimeoutUnit,
111-
connectTimeout, connectTimeoutUnit,
112-
quantile,
113-
retries, retryThisException,
114-
connector,
115-
source
116-
);
117-
}
118-
119106
public ClientBuilder withExecutor(ScheduledExecutorService executor) {
120107
return new ClientBuilder(
121108
name,
@@ -155,19 +142,6 @@ public ClientBuilder withSource(Publisher<List<SocketAddress>> source) {
155142
);
156143
}
157144

158-
public ClientBuilder withRetries(int nbOfRetries, Function<Throwable, Boolean> retryThisException) {
159-
return new ClientBuilder(
160-
name,
161-
executor,
162-
requestTimeout, requestTimeoutUnit,
163-
connectTimeout, connectTimeoutUnit,
164-
backupQuantile,
165-
nbOfRetries, retryThisException,
166-
connector,
167-
source
168-
);
169-
}
170-
171145
public ReactiveSocket build() {
172146
if (source == null) {
173147
throw new IllegalStateException("Please configure the source!");
@@ -183,14 +157,7 @@ public ReactiveSocket build() {
183157
Publisher<List<ReactiveSocketFactory<SocketAddress>>> factories =
184158
sourceToFactory(source, filterConnector);
185159

186-
ReactiveSocket socket = new LoadBalancer(factories);
187-
if (0.0 < backupQuantile && backupQuantile < 1.0) {
188-
socket = new BackupRequestSocket(socket, backupQuantile, executor);
189-
}
190-
if (retries > 0) {
191-
socket = new RetrySocket(socket, retries, t -> true);
192-
}
193-
return socket;
160+
return new LoadBalancer(factories);
194161
}
195162

196163
private Publisher<List<ReactiveSocketFactory<SocketAddress>>> sourceToFactory(

0 commit comments

Comments
 (0)