Skip to content
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
12 changes: 9 additions & 3 deletions site/src/pages/docs/client-retry.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ the maximum number of total attempts to 10 by default. You can change this value
`maxTotalAttempts` when you build a <type://RetryingClient>:

```java
RetryingClient.newDecorator(rule, maxTotalAttempts);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

RetryConfig config = RetryConfig.builder(rule)
.maxTotalAttempts(maxTotalAttempts)
.build();
RetryingClient.newDecorator(config);
```

Or, you can override the default value of 10 using the JVM system property
Expand All @@ -246,8 +249,11 @@ Second, it occurs when the time of individual attempt in retry has passed the ti
You can configure it when you create the decorator:

```java
RetryingClient.newDecorator(rule, maxTotalAttempts,
responseTimeoutMillisForEachAttempt);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

RetryConfig config = RetryConfig.builder(rule)
.maxTotalAttempts(maxTotalAttempts)
.responseTimeoutMillisForEachAttempt(responseTimeoutMillisForEachAttempt)
.build();
RetryingClient.newDecorator(config);
```

You can retry on this <type://ResponseTimeoutException>.
Expand Down
8 changes: 4 additions & 4 deletions site/src/pages/docs/client-thrift.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ using <type://ThriftClientBuilder#serializationFormat(SerializationFormat)>.
import com.linecorp.armeria.common.thrift.ThriftSerializationFormats;

HelloService.Iface helloService =
ThriftClient.builder("http://127.0.0.1:8080")
.path("/hello")
.serializationFormat(ThriftSerializationFormats.JSON)
.build(HelloService.Iface.class); // or AsyncIface.class
ThriftClients.builder("http://127.0.0.1:8080")
.path("/hello")
.serializationFormat(ThriftSerializationFormats.JSON)
.build(HelloService.Iface.class); // or AsyncIface.class
```

Since we specified `HelloService.Iface` as the client type, `ThriftClients.newClient()` will return a
Expand Down