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 Details

    • getTopicName

      default Optional<String> getTopicName()
      If the record originated from a topic, report the topic name.
    • getKey

      default Optional<String> getKey()
      Return a key if the key has one associated.
    • getSchema

      default org.apache.pulsar.client.api.Schema<T> getSchema()
    • getValue

      T getValue()
      Retrieves the actual data of the record.
      Returns:
      The record data
    • getEventTime

      default Optional<Long> getEventTime()
      Retrieves the event time of the record from the source.
      Returns:
      millis since epoch
    • getPartitionId

      default Optional<String> getPartitionId()
      Retrieves the partition information if any of the record.
      Returns:
      The partition id where the
    • getPartitionIndex

      default Optional<Integer> getPartitionIndex()
      Retrieves the partition index if any of the record.
      Returns:
      The partition index
    • getRecordSequence

      default Optional<Long> getRecordSequence()
      Retrieves the sequence of the record from a source partition.
      Returns:
      Sequence Id associated with the record
    • getProperties

      default Map<String,String> 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

      default Optional<String> getDestinationTopic()
      To support message routing on a per message basis.
      Returns:
      The topic this message should be written to
    • getMessage

      default Optional<org.apache.pulsar.client.api.Message<T>> getMessage()