Skip to main content
Quick navigation

Simulate message corruption

Introduction

From time to time, messages will arrive that are not in the expected format.

This interceptor adds a random bytes to the end of the data in records produced to Kafka.

Configuration

keytypedefaultdescription
topicString.*Regular expression that matches topics from your produce request.
sizeInBytesint10Number of random content bytes to append to the message data.
rateInPercentint100percentage of records that will have random bytes appended.

You can simulate corruption when:

  • sending data: io.conduktor.gateway.interceptor.chaos.ProduceSimulateMessageCorruptionPlugin
  • *reading data:io.conduktor.gateway.interceptor.chaos.FetchSimulateMessageCorruptionPlugin

Example

{
"name": "mySimulateMessageCorruptionInterceptor",
"pluginClass": "io.conduktor.gateway.interceptor.chaos.FetchSimulateMessageCorruptionPlugin",
"priority": 100,
"config": {
"topic": "client_topic_.*",
"sizeInBytes": 100,
"rateInPercent": 100
}
}