Skip to main content
Quick navigation

Simulate Leader Election Errors

Introduction

This interceptor is useful for testing applications to ensure they can survive leader election that happen:

  • When the leader dies, and another one needs to take over
  • When we do rolling upgrades

By sending

  • LEADER_NOT_AVAILABLE
  • NOT_LEADER_OR_FOLLOWER
  • BROKER_NOT_AVAILABLE

Configuration

keytypedescription
rateInPercentintThe percentage of requests that will result in a leader or broker not available response

Example

{
"name": "mySimulateLeaderElectionsErrorsPlugin",
"pluginClass": "io.conduktor.gateway.interceptor.chaos.SimulateLeaderElectionsErrorsPlugin",
"priority": 100,
"config": {
"rateInPercent": 100
}
}