Skip to content

Commit

Permalink
add docs onto TestSystemKafkaInterceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
osoykan committed Nov 29, 2024
1 parent 3f53cff commit 6771520
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ import org.springframework.kafka.support.ProducerListener
import kotlin.reflect.KClass
import kotlin.time.Duration

/**
* This is the main actor between your Kafka Spring Boot application and the test system.
* It is responsible for intercepting the messages that are produced and consumed by the application.
* It also provides a way to wait until a message is consumed or produced.
*
* @param serde The serializer/deserializer that will be used to serialize/deserialize the messages.
* It is important to use the same serde that is used in the application. For example, if the application uses Avro, then you should use Avro serde here.
* Target of the serialization is ByteArray, so the serde should be able to serialize the message to ByteArray.
*/
class TestSystemKafkaInterceptor<K, V>(
private val serde: StoveSerde<Any, ByteArray>
) : CompositeRecordInterceptor<K, V>(), ProducerListener<K, V> {
Expand Down

0 comments on commit 6771520

Please sign in to comment.