Class PubSubMessageHeaders

java.lang.Object
com.linkedin.venice.pubsub.api.PubSubMessageHeaders
All Implemented Interfaces:
Measurable, Iterable<PubSubMessageHeader>
Direct Known Subclasses:
EmptyPubSubMessageHeaders

public class PubSubMessageHeaders extends Object implements Measurable, Iterable<PubSubMessageHeader>
Set of key-value pairs to tagged with messages produced to a topic. In case of headers with the same key, only the most recently added headers value will be kept.
  • Field Details

    • EXECUTION_ID_KEY

      public static final String EXECUTION_ID_KEY
      See Also:
    • VENICE_TRANSPORT_PROTOCOL_HEADER

      public static final String VENICE_TRANSPORT_PROTOCOL_HEADER
      See Also:
    • VENICE_LEADER_COMPLETION_STATE_HEADER

      public static final String VENICE_LEADER_COMPLETION_STATE_HEADER
      Header to denote whether the leader is completed or not
      See Also:
    • VENICE_VIEW_PARTITIONS_MAP_HEADER

      public static final String VENICE_VIEW_PARTITIONS_MAP_HEADER
      Header to provide the desired view partition mapping for the given message. Example usage: 1. A VPJ containing large messages write chunks with the header {"view1":[0], "view2":[1, 2]}. Partition leaders during NR pass-through in remote fabrics can forward chunks to their destination view partition(s) without any further processing. In the example, this chunk should be sent to view1's partition 0 and view2's partitions 1 & 2.
      See Also:
    • VENICE_PARTITION_RECORD_COUNT_HEADER

      public static final String VENICE_PARTITION_RECORD_COUNT_HEADER
      Header carrying per-partition record count on End-of-Push control messages. Value is an 8-byte big-endian encoded long representing the number of records written to that partition. Used for server-side batch push verification.
      See Also:
    • PRC_HEADER_UNAVAILABLE_SENTINEL

      public static final long PRC_HEADER_UNAVAILABLE_SENTINEL
      Sentinel value stamped into VENICE_PARTITION_RECORD_COUNT_HEADER when the producer cannot supply a count (e.g. legacy code paths, partition-level fallback). Consumers must treat a header carrying this value as "count unavailable" and skip the EOP record-count verification rather than reading -1 as a literal record count.
      See Also:
  • Constructor Details

    • PubSubMessageHeaders

      public PubSubMessageHeaders()
  • Method Details