Class KafkaProducerMessage<K,V>
java.lang.Object
io.helidon.messaging.connectors.kafka.KafkaProducerMessage<K,V>
- Type Parameters:
K
- the type of Kafka record keyV
- the type of Kafka record value
- All Implemented Interfaces:
KafkaMessage<K,
,V> Message<V>
Kafka specific Micro Profile Reactive Messaging Producer Message.
-
Method Summary
Modifier and TypeMethodDescriptionack()
ReturnsConsumerRecord
if message was received from Kafka, otherwise returnOptional.empty()
.org.apache.kafka.common.header.Headers
ReturnsHeaders
received from Kafka with record or empty headers if message was not created by Kafka connector.getKey()
Key orOptional.empty()
if non is specified.Offset of the record in partition from which was this message received.Number of partition from which was this message received.getTopic()
Name of the topic from which was this message received.
-
Method Details
-
getTopic
Description copied from interface:KafkaMessage
Name of the topic from which was this message received.- Specified by:
getTopic
in interfaceKafkaMessage<K,
V> - Returns:
- topic name
-
getPartition
Description copied from interface:KafkaMessage
Number of partition from which was this message received.- Specified by:
getPartition
in interfaceKafkaMessage<K,
V> - Returns:
- partition number
-
getOffset
Description copied from interface:KafkaMessage
Offset of the record in partition from which was this message received.- Specified by:
getOffset
in interfaceKafkaMessage<K,
V> - Returns:
- offset number
-
getConsumerRecord
Description copied from interface:KafkaMessage
ReturnsConsumerRecord
if message was received from Kafka, otherwise returnOptional.empty()
.- Specified by:
getConsumerRecord
in interfaceKafkaMessage<K,
V> - Returns:
ConsumerRecord
orOptional.empty()
-
getKey
Description copied from interface:KafkaMessage
Key orOptional.empty()
if non is specified.- Specified by:
getKey
in interfaceKafkaMessage<K,
V> - Returns:
- Key or
Optional.empty()
-
getHeaders
public org.apache.kafka.common.header.Headers getHeaders()Description copied from interface:KafkaMessage
ReturnsHeaders
received from Kafka with record or empty headers if message was not created by Kafka connector.- Specified by:
getHeaders
in interfaceKafkaMessage<K,
V> - Returns:
Headers
received from Kafka or empty headers if message was not created by Kafka connector
-
getPayload
- Specified by:
getPayload
in interfaceMessage<K>
-
ack
-