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
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
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
addMetadata, getMetadata, nack, unwrap, withAck, withMetadata, withMetadata, withNack, 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>
-
getAck
- Specified by:
getAckin interfaceorg.eclipse.microprofile.reactive.messaging.Message<K>
-
getNack
- Specified by:
getNackin 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>
-