Class IncomingKafkaRecord<K,T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.kafka.IncomingKafkaRecord<K,T>
-
- All Implemented Interfaces:
KafkaRecord<K,T>
,Message<T>
public class IncomingKafkaRecord<K,T> extends Object implements KafkaRecord<K,T>
-
-
Constructor Summary
Constructors Constructor Description IncomingKafkaRecord(io.vertx.mutiny.kafka.client.consumer.KafkaConsumer<K,T> consumer, io.vertx.mutiny.kafka.client.consumer.KafkaConsumerRecord<K,T> record)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletionStage<Void>
ack()
Acknowledge this message.Supplier<CompletionStage<Void>>
getAck()
org.apache.kafka.common.header.Headers
getHeaders()
K
getKey()
Metadata
getMetadata()
long
getOffset()
int
getPartition()
T
getPayload()
Instant
getTimestamp()
String
getTopic()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.microprofile.reactive.messaging.Message
addMetadata, getMetadata, unwrap, withAck, withMetadata, withMetadata, withPayload
-
-
-
-
Method Detail
-
getPayload
public T getPayload()
- Specified by:
getPayload
in interfaceMessage<K>
- Returns:
- The payload for this message.
-
getKey
public K getKey()
- Specified by:
getKey
in interfaceKafkaRecord<K,T>
-
getTopic
public String getTopic()
- Specified by:
getTopic
in interfaceKafkaRecord<K,T>
-
getPartition
public int getPartition()
- Specified by:
getPartition
in interfaceKafkaRecord<K,T>
-
getTimestamp
public Instant getTimestamp()
- Specified by:
getTimestamp
in interfaceKafkaRecord<K,T>
-
getHeaders
public org.apache.kafka.common.header.Headers getHeaders()
- Specified by:
getHeaders
in interfaceKafkaRecord<K,T>
-
getOffset
public long getOffset()
-
getMetadata
public Metadata getMetadata()
- Specified by:
getMetadata
in interfaceMessage<K>
- Returns:
- The set of metadata attached to this message, potentially empty.
-
getAck
public Supplier<CompletionStage<Void>> getAck()
- Specified by:
getAck
in interfaceMessage<K>
- Returns:
- the supplier used to retrieve the acknowledgement
CompletionStage
.
-
-