0
我使用Akka Kafka(Scala)並希望發送自定義對象。Akka Kafka自定義串行器
class TweetsSerializer extends Serializer[Seq[MyCustomType]] {
override def configure(configs: util.Map[String, _], isKey: Boolean): Unit = ???
override def serialize(topic: String, data: Seq[MyCustomType]): Array[Byte] = ???
override def close(): Unit = ???
}
我該如何正確編寫我自己的序列化程序?而且,我應該如何處理字段config
?
只是谷歌的例子嗎? –
@BranislavLazic我無法找到任何有用的例子在谷歌:( – Evgeniy