code: public void pushMessages(List<byte[]> messages) {
      List<KeyedMessage<String, byte[]>> keyedMessages = Lists.transform(messages,
          new Function<byte[], KeyedMessage<String, byte[]>>() {
            @Nullable
            @Override
            public KeyedMessage<String, byte[]> apply(byte[] bytes) {
              return new KeyedMessage<String, byte[]>(topic, bytes);
            }
          });
      this.producer.send(keyedMessages);
    }
docs: Push all mbyte array messages to the Kafka topic.
  @param messages List of byte array messages to push to Kakfa.