Class IncomingKafkaRecordBatch<K,T>
java.lang.Object
io.smallrye.reactive.messaging.kafka.IncomingKafkaRecordBatch<K,T>
- All Implemented Interfaces:
KafkaRecordBatch<K,,T> ContextAwareMessage<List<T>>,Iterable<KafkaRecord<K,,T>> org.eclipse.microprofile.reactive.messaging.Message<List<T>>
-
Field Summary
Fields inherited from interface org.eclipse.microprofile.reactive.messaging.Message
EMPTY_ACK, EMPTY_NACK, LOGGER -
Constructor Summary
ConstructorsConstructorDescriptionIncomingKafkaRecordBatch(org.apache.kafka.clients.consumer.ConsumerRecords<K, T> records, String channel, int index, KafkaCommitHandler commitHandler, KafkaFailureHandler onNack, boolean cloudEventEnabled, boolean tracingEnabled) -
Method Summary
Modifier and TypeMethodDescriptionack(org.eclipse.microprofile.reactive.messaging.Metadata metadata) Function<org.eclipse.microprofile.reactive.messaging.Metadata,CompletionStage<Void>> Map<org.apache.kafka.common.TopicPartition,KafkaRecord<K, T>> org.eclipse.microprofile.reactive.messaging.MetadataBiFunction<Throwable,org.eclipse.microprofile.reactive.messaging.Metadata, CompletionStage<Void>> List<KafkaRecord<K,T>> iterator()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.smallrye.reactive.messaging.providers.locals.ContextAwareMessage
getContextMetadata, runOnMessageContextMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.eclipse.microprofile.reactive.messaging.Message
ack, addMetadata, getAck, getMetadata, getNack, nack, thenApply, unwrap, withAck, withAckWithMetadata, withMetadata, withMetadata, withNack, withNackWithMetadata, withPayload
-
Constructor Details
-
IncomingKafkaRecordBatch
public IncomingKafkaRecordBatch(org.apache.kafka.clients.consumer.ConsumerRecords<K, T> records, String channel, int index, KafkaCommitHandler commitHandler, KafkaFailureHandler onNack, boolean cloudEventEnabled, boolean tracingEnabled)
-
-
Method Details
-
getPayload
- Specified by:
getPayloadin interfaceorg.eclipse.microprofile.reactive.messaging.Message<K>
-
getRecords
- Specified by:
getRecordsin interfaceKafkaRecordBatch<K,T> - Returns:
- list of records contained in this message batch
-
iterator
-
getLatestOffsetRecords
- Specified by:
getLatestOffsetRecordsin interfaceKafkaRecordBatch<K,T> - Returns:
- map of records with latest offset by topic partition
-
getMetadata
public org.eclipse.microprofile.reactive.messaging.Metadata getMetadata()- Specified by:
getMetadatain interfaceorg.eclipse.microprofile.reactive.messaging.Message<K>
-
getAckWithMetadata
public Function<org.eclipse.microprofile.reactive.messaging.Metadata,CompletionStage<Void>> getAckWithMetadata()- Specified by:
getAckWithMetadatain interfaceorg.eclipse.microprofile.reactive.messaging.Message<K>
-
getNackWithMetadata
public BiFunction<Throwable,org.eclipse.microprofile.reactive.messaging.Metadata, getNackWithMetadata()CompletionStage<Void>> - Specified by:
getNackWithMetadatain interfaceorg.eclipse.microprofile.reactive.messaging.Message<K>
-
ack
- Specified by:
ackin interfaceorg.eclipse.microprofile.reactive.messaging.Message<K>
-
nack
public CompletionStage<Void> nack(Throwable reason, org.eclipse.microprofile.reactive.messaging.Metadata metadata) - Specified by:
nackin interfaceorg.eclipse.microprofile.reactive.messaging.Message<K>
-