Class TcpChaosProfile


public class TcpChaosProfile extends ObjectWithJsonToString
Declarative TCP-layer fault/chaos injection profile, applied at the raw byte level before HTTP decoding. Each fault type mirrors one of Toxiproxy's named toxics:
  • latency — delay all inbound data by latencyMs milliseconds
  • down — silently drop all inbound data (service appears down)
  • bandwidth — throttle inbound data to bandwidthBytesPerSec
  • slow_close — delay the TCP FIN by 2 seconds
  • timeout — never send FIN; connection hangs on close
  • reset_peer — send TCP RST and close immediately
  • slicer — fragment inbound data into chunks of slicerChunkSize bytes
  • limit_data — close the connection after limitDataBytes bytes received

Profiles are registered in the TcpChaosRegistry and applied by the TcpChaosHandler Netty handler. When multiple faults are configured on the same profile, they are evaluated in priority order: down, resetPeer, limitData, slicer, bandwidth, latency.

Follows the model field/withX/getter convention so it round-trips through Jackson without a bespoke (de)serializer.