Class CompositeProducerInterceptor<K,V>
java.lang.Object
org.springframework.kafka.support.CompositeProducerInterceptor<K,V>
- Type Parameters:
K
- the key type.V
- the value type.
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.kafka.clients.producer.ProducerInterceptor<K,
,V> org.apache.kafka.common.Configurable
public class CompositeProducerInterceptor<K,V>
extends Object
implements org.apache.kafka.clients.producer.ProducerInterceptor<K,V>, Closeable
A
ProducerInterceptor
that delegates to a collection of interceptors.- Since:
- 3.0
- Author:
- Soby Chacko
-
Constructor Summary
ConstructorDescriptionCompositeProducerInterceptor
(org.apache.kafka.clients.producer.ProducerInterceptor<K, V>... delegates) Construct an instance with the provided delegates toProducerInterceptor
s. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
void
onAcknowledgement
(org.apache.kafka.clients.producer.RecordMetadata metadata, Exception exception)
-
Constructor Details
-
CompositeProducerInterceptor
@SafeVarargs public CompositeProducerInterceptor(org.apache.kafka.clients.producer.ProducerInterceptor<K, V>... delegates) Construct an instance with the provided delegates toProducerInterceptor
s.- Parameters:
delegates
- the delegates.
-
-
Method Details
-
onSend
-
onAcknowledgement
public void onAcknowledgement(org.apache.kafka.clients.producer.RecordMetadata metadata, Exception exception) -
close
public void close() -
configure
- Specified by:
configure
in interfaceorg.apache.kafka.common.Configurable
-