All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mageddo.tobby.ProducerRecord Maven / Gradle / Ivy

There is a newer version: 2.1.6-alpha
Show newest version
package com.mageddo.tobby;

import lombok.Builder;
import lombok.Value;

@Value
@Builder(toBuilder = true)
public class ProducerRecord {

  private String topic;
  private Integer partition;
  private byte[] key;
  private byte[] value;
  private Headers headers;

  public ProducerRecord(String topic, byte[] value) {
    this(topic, null, value);
  }

  public ProducerRecord(String topic, byte[] key, byte[] value) {
    this(topic, null, key, value);
  }

  public ProducerRecord(String topic, Integer partition, byte[] key, byte[] value) {
    this(topic, partition, key, value, null);
  }

  public ProducerRecord(
      String topic, Integer partition, byte[] key, byte[] value, Headers headers
  ) {
    this.topic = topic;
    this.partition = partition;
    this.key = key;
    this.value = value;
    this.headers = headers;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy