Class FaultRule.Builder
java.lang.Object
org.apache.kafka.test.faultproxy.FaultRule.Builder
- Enclosing class:
FaultRule
-
Method Summary
Modifier and TypeMethodDescriptionFire on every matching response until removed.Scope this fault to requests whose clientId containssubstring— e.g.onCall(int n) Fire on exactly then-th matching response (1-based).once()Fire on the first matching response only.times(int n) Fire on the firstnmatching responses.withProbability(double p) Fire on each matching response with the given probability (chaos mode; non-deterministic).
-
Method Details
-
forClient
Scope this fault to requests whose clientId containssubstring— e.g.forClient("restore")to fault only the restore consumer (leaving the main consumer and producer untouched). Without this, the rule matches any client. -
once
Fire on the first matching response only. -
onCall
Fire on exactly then-th matching response (1-based). -
times
Fire on the firstnmatching responses. -
everyTime
Fire on every matching response until removed. -
withProbability
Fire on each matching response with the given probability (chaos mode; non-deterministic).
-