MCPcopy
hub / github.com/IBM/sarama / ProducerInterceptor

Interface ProducerInterceptor

interceptors.go:6–12  ·  interceptors.go::ProducerInterceptor

ProducerInterceptor allows you to intercept (and possibly mutate) the records received by the producer before they are published to the Kafka cluster. https://cwiki.apache.org/confluence/display/KAFKA/KIP-42%3A+Add+Producer+and+Consumer+Interceptors#KIP42:AddProducerandConsumerInterceptors-Motivatio

Source from the content-addressed store, hash-verified

4// received by the producer before they are published to the Kafka cluster.
5// https://cwiki.apache.org/confluence/display/KAFKA/KIP-42%3A+Add+Producer+and+Consumer+Interceptors#KIP42:AddProducerandConsumerInterceptors-Motivation
6type ProducerInterceptor interface {
7
8 // OnSend is called when the producer message is intercepted. Please avoid
9 // modifying the message until it's safe to do so, as this is _not_ a copy
10 // of the message.
11 OnSend(*ProducerMessage)
12}
13
14// ConsumerInterceptor allows you to intercept (and possibly mutate) the records
15// received by the consumer before they are sent to the messages channel.

Callers 1

Implementers 2

appendInterceptorhelpers_test.go
OTelInterceptorexamples/interceptors/trace_intercepto

Calls

no outgoing calls

Tested by

no test coverage detected