public class KafkaEventMessage extends Object implements KafkaMetadataProvider<TrackedEventMessage<?>>, Comparable<KafkaEventMessage>
Constructor and Description |
---|
KafkaEventMessage(TrackedEventMessage<?> eventMessage,
int partition,
long offset,
long timestamp) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(KafkaEventMessage other)
Compares
ConsumerRecord based on timestamp. |
static KafkaEventMessage |
from(EventMessage<?> eventMessage,
org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record,
KafkaTrackingToken token) |
long |
offset()
The position of record in the corresponding Kafka partition.
|
int |
partition()
The partition from which record is received
|
long |
timestamp()
The timestamp of record
|
String |
toString() |
TrackedEventMessage<?> |
value()
The value
|
public KafkaEventMessage(TrackedEventMessage<?> eventMessage, int partition, long offset, long timestamp)
public static KafkaEventMessage from(EventMessage<?> eventMessage, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, KafkaTrackingToken token)
public int partition()
KafkaMetadataProvider
partition
in interface KafkaMetadataProvider<TrackedEventMessage<?>>
public long offset()
KafkaMetadataProvider
offset
in interface KafkaMetadataProvider<TrackedEventMessage<?>>
public long timestamp()
KafkaMetadataProvider
timestamp
in interface KafkaMetadataProvider<TrackedEventMessage<?>>
public TrackedEventMessage<?> value()
KafkaMetadataProvider
value
in interface KafkaMetadataProvider<TrackedEventMessage<?>>
public int compareTo(KafkaEventMessage other)
ConsumerRecord
based on timestamp.
If two records are published at the same time and belongs to:
compareTo
in interface Comparable<KafkaEventMessage>
Copyright © 2010–2018. All rights reserved.