Package org.apache.pulsar.functions.api
Interface Record<T>
- All Known Subinterfaces:
KVRecord<K,
V>
- All Known Implementing Classes:
FunctionRecord
@Public
@Stable
public interface Record<T>
Pulsar Connect's Record interface. Record encapsulates the information about a record being read from a Source.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
ack()
Acknowledge that this record is fully processed.default void
fail()
To indicate that this record has failed to be processed.To support message routing on a per message basis.Retrieves the event time of the record from the source.getKey()
Return a key if the key has one associated.Retrieves the partition information if any of the record.Retrieves the partition index if any of the record.Retrieves user-defined properties attached to record.Retrieves the sequence of the record from a source partition.default org.apache.pulsar.client.api.Schema<T>
If the record originated from a topic, report the topic name.getValue()
Retrieves the actual data of the record.
-
Method Details
-
getTopicName
If the record originated from a topic, report the topic name. -
getKey
Return a key if the key has one associated. -
getSchema
-
getValue
T getValue()Retrieves the actual data of the record.- Returns:
- The record data
-
getEventTime
Retrieves the event time of the record from the source.- Returns:
- millis since epoch
-
getPartitionId
Retrieves the partition information if any of the record.- Returns:
- The partition id where the
-
getPartitionIndex
Retrieves the partition index if any of the record.- Returns:
- The partition index
-
getRecordSequence
Retrieves the sequence of the record from a source partition.- Returns:
- Sequence Id associated with the record
-
getProperties
Retrieves user-defined properties attached to record.- Returns:
- Map of user-properties
-
ack
default void ack()Acknowledge that this record is fully processed. -
fail
default void fail()To indicate that this record has failed to be processed. -
getDestinationTopic
To support message routing on a per message basis.- Returns:
- The topic this message should be written to
-
getMessage
-