io.vertx.kafka.client.producer

## Interface KafkaProducerRecord<K,V>

-     public interface KafkaProducerRecord<K,V>

  Vert.x Kafka producer record.

- - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <K,V> KafkaProducerRecord<K,V>` | `create(String topic, K key, V value)` Create a concrete instance of a Vert.x producer record
    `static <K,V> KafkaProducerRecord<K,V>` | `create(String topic, K key, V value, Integer partition)` Create a concrete instance of a Vert.x producer record
    `static <K,V> KafkaProducerRecord<K,V>` | `create(String topic, K key, V value, Long timestamp, Integer partition)` Create a concrete instance of a Vert.x producer record
    `static <K,V> KafkaProducerRecord<K,V>` | `create(String topic, V value)` Create a concrete instance of a Vert.x producer record
    `K` | `key()`
    `Integer` | `partition()`
    `org.apache.kafka.clients.producer.ProducerRecord` | `record()`
    `Long` | `timestamp()`
    `String` | `topic()`
    `V` | `value()`

- - ### Method Detail

    - #### create

          static <K,V> KafkaProducerRecord<K,V> create(String topic,
                                                       K key,
                                                       V value,
                                                       Long timestamp,
                                                       Integer partition)

      Create a concrete instance of a Vert.x producer record
      Type Parameters:
        `K` - key type
        `V` - value type
      Parameters:
        `topic` - the topic this record is being sent to
        `key` - the key (or null if no key is specified)
        `value` - the value
        `timestamp` - the timestamp of this record
        `partition` - the partition to which the record will be sent (or null if no partition was specified)
      Returns:
        Vert.x producer record

    - #### create

          static <K,V> KafkaProducerRecord<K,V> create(String topic,
                                                       K key,
                                                       V value,
                                                       Integer partition)

      Create a concrete instance of a Vert.x producer record
      Type Parameters:
        `K` - key type
        `V` - value type
      Parameters:
        `topic` - the topic this record is being sent to
        `key` - the key (or null if no key is specified)
        `value` - the value
        `partition` - the partition to which the record will be sent (or null if no partition was specified)
      Returns:
        Vert.x producer record

    - #### create

          static <K,V> KafkaProducerRecord<K,V> create(String topic,
                                                       K key,
                                                       V value)

      Create a concrete instance of a Vert.x producer record
      Type Parameters:
        `K` - key type
        `V` - value type
      Parameters:
        `topic` - the topic this record is being sent to
        `key` - the key (or null if no key is specified)
        `value` - the value
      Returns:
        Vert.x producer record

    - #### create

          static <K,V> KafkaProducerRecord<K,V> create(String topic,
                                                       V value)

      Create a concrete instance of a Vert.x producer record
      Type Parameters:
        `K` - key type
        `V` - value type
      Parameters:
        `topic` - the topic this record is being sent to
        `value` - the value
      Returns:
        Vert.x producer record

    - #### topic

          String topic()

      Returns:
        the topic this record is being sent to

    - #### key

          K key()

      Returns:
        the key (or null if no key is specified)

    - #### value

          V value()

      Returns:
        the value

    - #### timestamp

          Long timestamp()

      Returns:
        the timestamp of this record

    - #### partition

          Integer partition()

      Returns:
        the partition to which the record will be sent (or null if no partition was specified)

    - #### record

          org.apache.kafka.clients.producer.ProducerRecord record()

      Returns:
        the native Kafka producer record with backed information

Copyright © 2017. All rights reserved.