Retry behavior

Configure retry behavior for methods:

retry_service.proto
1syntax = "proto3";
2
3package userservice.v1;
4
5service UserService {
6 rpc ProcessPayment(ProcessPaymentRequest) returns (PaymentResult) {
7 option (x_fern_retry) = '{
8 "max_attempts": 3,
9 "exponential_backoff": true,
10 "initial_delay_ms": 1000,
11 "max_delay_ms": 30000,
12 "retry_on_status": ["UNAVAILABLE", "DEADLINE_EXCEEDED", "INTERNAL"]
13 }';
14 }
15
16 rpc UploadFile(UploadFileRequest) returns (UploadFileResponse) {
17 option (x_fern_retry) = '{
18 "max_attempts": 5,
19 "exponential_backoff": true,
20 "initial_delay_ms": 2000,
21 "max_delay_ms": 60000
22 }';
23 }
24}