Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

org.apache.kafka.clients.producer.Partitioner


Code Block
languagejava
firstlinePartitioner
    @Deprecated
    default int partition(String topic, Object key, byte[] keyBytes, Object value, byte[] valueBytes, Cluster cluster) {
        throw new UnsupportedOperationException("this method is not used on production anymore");
    }

    default int partition(String topic, Object key, ByteBuffer keyBytes, Object value, ByteBuffer valueBytes, Cluster cluster) {
        return partition(topic, key, Utils.getOrCopyArray(keyBytes), value, Utils.getOrCopyArray(valueBytes), cluster);
    }

...