Created
December 20, 2016 19:03
-
-
Save timvw/9185668dff5fcbf76d251c55718ffd10 to your computer and use it in GitHub Desktop.
Kafka serializer for Akka ByteString
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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