Skip to content

Instantly share code, notes, and snippets.

View ohadbitt's full-sized avatar

ohad bitton ohadbitt

  • Microsoft Corporation
View GitHub Profile
@ohadbitt
ohadbitt / gist:8475dc9f63df1c0d0bc322e9b00fdd00
Last active December 19, 2019 14:37
Sample code of kafka producer to send file as bytes. This is the expected format to send avro files to kusto.
package com.microsoft.azure.kusto.kafka.producer;
import org.apache.kafka.clients.producer.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;