Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public interface ConsumerInterceptor<K, V> extends Configurable, AutoCloseable {
* @param records records to be consumed by the client or records returned by the previous interceptors in the list.
* @return records that are either modified by the interceptor or same as records passed to this method.
*/
public ConsumerRecords<K, V> onConsume(ConsumerRecords<K, V> records);
ConsumerRecords<K, V> onConsume(ConsumerRecords<K, V> records);

/**
* This is called when offsets get committed.
Expand All @@ -74,10 +74,10 @@ public interface ConsumerInterceptor<K, V> extends Configurable, AutoCloseable {
*
* @param offsets A map of offsets by partition with associated metadata
*/
public void onCommit(Map<TopicPartition, OffsetAndMetadata> offsets);
void onCommit(Map<TopicPartition, OffsetAndMetadata> offsets);

/**
* This is called when interceptor is closed
*/
public void close();
void close();
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public interface ProducerInterceptor<K, V> extends Configurable {
* @param record the record from client or the record returned by the previous interceptor in the chain of interceptors.
* @return producer record to send to topic/partition
*/
public ProducerRecord<K, V> onSend(ProducerRecord<K, V> record);
ProducerRecord<K, V> onSend(ProducerRecord<K, V> record);

/**
* This method is called when the record sent to the server has been acknowledged, or when sending the record fails before
Expand All @@ -86,10 +86,10 @@ public interface ProducerInterceptor<K, V> extends Configurable {
* {@link org.apache.kafka.clients.producer.KafkaProducer#send(ProducerRecord)}.
* @param exception The exception thrown during processing of this record. Null if no error occurred.
*/
public void onAcknowledgement(RecordMetadata metadata, Exception exception);
void onAcknowledgement(RecordMetadata metadata, Exception exception);

/**
* This is called when interceptor is closed
*/
public void close();
void close();
}