Hi Casey, Yes, you can send messages as byte arrays. If you look at the constructor of the Message class, you will see -
def this(bytes: Array[Byte]) Now, looking at the Producer send() API - def send(producerData: ProducerData[K,V]*) You can set V to be of type Message and K to what you want your key to be. If you don't care about partitioning using a key, then set that to Message type as well. Thanks, Neha On Thu, Dec 1, 2011 at 11:46 AM, Sybrandy, Casey < caseysybra...@noviidesign.com> wrote: > All, > > Can one send byte arrays as messages to Kafka without having to encode > them, such as using Base64? We're trying to be as space efficient as > possible, however any gains made by using binary data formats, such as > BSON, are lost when we Base64 encode the data. I tried once before, but > got an error with a conversion to a string, so I wanted to check and see if > anyone else has done this. > > Thanks. > > Casey