Skip to content

Instantly share code, notes, and snippets.

@timvw
Created December 20, 2016 19:03
Show Gist options
  • Save timvw/9185668dff5fcbf76d251c55718ffd10 to your computer and use it in GitHub Desktop.
Save timvw/9185668dff5fcbf76d251c55718ffd10 to your computer and use it in GitHub Desktop.
Kafka serializer for Akka ByteString
val byteStringSerializer = new org.apache.kafka.common.serialization.Serializer[ByteString]() {
override def configure(configs: util.Map[String, _], isKey: Boolean): Unit = {}
override def serialize(topic: String, data: ByteString): Array[Byte] = data.toArray
override def close(): Unit = {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment