Class ListenerRecord


  • public final class ListenerRecord
    extends java.lang.Object
    A key/value pair to be received from Marlin. This consists of a topic name and a feedId number, from which the record is being received and an offset that points to the record in Marlin feedId.
    • Constructor Summary

      Constructors 
      Constructor Description
      ListenerRecord​(java.lang.String topic, int feedId, long offset, long timestamp, int timestampType, byte[] key, byte[] value, org.apache.kafka.common.header.Headers headers, java.lang.String producer)
      Create a record
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int feedId()
      The feedId from which this record is received
      org.apache.kafka.common.header.Headers headers()
      Headers
      byte[] key()
      The key (or null if no key is specified)
      long offset()
      The position of this record in the corresponding Kafka partition.
      java.lang.String producer()
      The producer
      long timestamp()
      The timestamp at which this record was produced
      int timestampType()
      The timestamp type of the record
      java.lang.String topic()
      The topic this record is received from
      java.lang.String toString()  
      byte[] value()
      The value
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ListenerRecord

        public ListenerRecord​(java.lang.String topic,
                              int feedId,
                              long offset,
                              long timestamp,
                              int timestampType,
                              byte[] key,
                              byte[] value,
                              org.apache.kafka.common.header.Headers headers,
                              java.lang.String producer)
        Create a record
        Parameters:
        topic - The topic this record is received from
        feedId - The feedId of the topic this record is received from
        offset - The offset of this record in the corresponding partition
        timestamp - The timestamp at which the msg was produced
        key - The record key
        value - The record contents
        headers - Record headers
        producer - The record producer
    • Method Detail

      • topic

        public java.lang.String topic()
        The topic this record is received from
      • feedId

        public int feedId()
        The feedId from which this record is received
      • key

        public byte[] key()
        The key (or null if no key is specified)
      • value

        public byte[] value()
        The value
      • producer

        public java.lang.String producer()
        The producer
      • headers

        public org.apache.kafka.common.header.Headers headers()
        Headers
      • offset

        public long offset()
        The position of this record in the corresponding Kafka partition.
      • timestamp

        public long timestamp()
        The timestamp at which this record was produced
      • timestampType

        public int timestampType()
        The timestamp type of the record
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object